Skip to content

feat: add Navbar component and update header and sections with IDs for smooth scrolling#7

Open
vedanta007 wants to merge 1 commit intoChessBase-India:mainfrom
vedanta007:vedanta007/add-navbar-1
Open

feat: add Navbar component and update header and sections with IDs for smooth scrolling#7
vedanta007 wants to merge 1 commit intoChessBase-India:mainfrom
vedanta007:vedanta007/add-navbar-1

Conversation

@vedanta007
Copy link

No description provided.

@vercel
Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
helpchess ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 13, 2025 9:56am
helpchess-h7i9 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 13, 2025 9:56am

Copy link
Member

@hadron43 hadron43 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for PR! @vedanta007

@adxy I would recommend merging this to a different branch (say helpchess_redesign) and not main, as this breaks the overall theming scheme for the website.

We can later merge helpchess_redesign with main when all the components are redesigned.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's stick to using yarn as the package manager. In that case, we would not require package-lock.json file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not responsive:
image

Copy link
Member

@hadron43 hadron43 Feb 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Links should take to the parent container, and not the headings.
  • The NavBar is not sticky
  • In the design we have text, here we have the logo.

PR:
image

Design:
image

"react-dom": "^18",
"styled-components": "^6.1.2"
"styled-components": "^6.1.2",
"yarn": "^1.22.22"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this intentional?

@@ -1,4 +1,5 @@
import styled from "styled-components";
import Navbar from "../Navbar";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Use @/components/Navbar.
  • Leave a line between library imports and custom component imports.

Example:
https://github.com/ChessBase-India/helpchess/blob/568f841ac617f8d7c46de51909bd2b59933263b5/src/pages/index.jsx#L1C1-L19C71

<NavbarContainer>
<img src="/images/logo.png" alt="HELPCHESSFOUNDATION" style={{ width: '6.303rem', height: '2rem' }} />
<NavLinks>
{routes.map((route) => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve warnings/errors in log:

Warning: Each child in a list should have a unique "key" prop.

Check the top-level render call using <pages__SectionDonate>. See https://reactjs.org/link/warning-keys for more information.
    at DonateNowCard (webpack-internal:///./src/components/DonateNowCard.jsx:25:26)
    at Home (webpack-internal:///./src/pages/index.jsx:153:80)
    at div
    at I (/home/hadron43/projects/helpchess/node_modules/styled-components/dist/styled-components.cjs.js:1:22679)
    at div
    at I (/home/hadron43/projects/helpchess/node_modules/styled-components/dist/styled-components.cjs.js:1:22679)
    at Layout (webpack-internal:///./src/components/Layout/index.jsx:31:1)
    at main
    at exports.ThemeProvider (/home/hadron43/projects/helpchess/node_modules/styled-components/dist/styled-components.cjs.js:1:27623)
    at App (webpack-internal:///./src/pages/_app.js:20:16)
    at StyleRegistry (/home/hadron43/projects/helpchess/node_modules/styled-jsx/dist/index/index.js:449:36)
    at eY (/home/hadron43/projects/helpchess/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:8:22559)
    at eI (/home/hadron43/projects/helpchess/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:17:1760)
    at eD (/home/hadron43/projects/helpchess/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:17:3083)
    at div
    at eQ (/home/hadron43/projects/helpchess/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:26:763)
styled-components: it looks like an unknown prop "secondary" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)
Warning: Received `true` for a non-boolean attribute `secondary`.

If you want to write it to the DOM, pass a string instead: secondary="true" or secondary={value.toString()}.
    at button
    at I (/home/hadron43/projects/helpchess/node_modules/styled-components/dist/styled-components.cjs.js:1:22679)
    at Button (webpack-internal:///./src/components/Button.jsx:24:19)
    at a
    at LinkComponent (webpack-internal:///./node_modules/next/dist/client/link.js:104:19)
    at div
    at I (/home/hadron43/projects/helpchess/node_modules/styled-components/dist/styled-components.cjs.js:1:22679)
    at SupportOrgCard
    at section
    at I (/home/hadron43/projects/helpchess/node_modules/styled-components/dist/styled-components.cjs.js:1:22679)
    at div
    at I (/home/hadron43/projects/helpchess/node_modules/styled-components/dist/styled-components.cjs.js:1:22679)
    at Home (webpack-internal:///./src/pages/index.jsx:153:80)
    at div
    at I (/home/hadron43/projects/helpchess/node_modules/styled-components/dist/styled-components.cjs.js:1:22679)
    at div
    at I (/home/hadron43/projects/helpchess/node_modules/styled-components/dist/styled-components.cjs.js:1:22679)
    at Layout (webpack-internal:///./src/components/Layout/index.jsx:31:1)
    at main
    at exports.ThemeProvider (/home/hadron43/projects/helpchess/node_modules/styled-components/dist/styled-components.cjs.js:1:27623)
    at App (webpack-internal:///./src/pages/_app.js:20:16)
    at StyleRegistry (/home/hadron43/projects/helpchess/node_modules/styled-jsx/dist/index/index.js:449:36)
    at eY (/home/hadron43/projects/helpchess/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:8:22559)
    at eI (/home/hadron43/projects/helpchess/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:17:1760)
    at eD (/home/hadron43/projects/helpchess/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:17:3083)
    at div
    at eQ (/home/hadron43/projects/helpchess/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:26:763)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants