Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add navbar to all pages #51

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add navbar to all pages #51

wants to merge 4 commits into from

Conversation

aliicezhao
Copy link

Notion ticket link

Add Navbar To All Pages

Implementation description

  • Added the NavBar component to all pages where users are logged in (all pages except for /login and /signup).
  • Displays the page name of the current page based on the route using layout.

Steps to test

  1. Verify the NavBar appears on all pages except /login and /signup.
  2. Ensure the NavBar correctly displays the page name based on the current route
  3. Test that the NavBar buttons work as expected and that the component is responsive (check mobile and tablet views).

What should reviewers focus on?

  • NavBar sizing is appropriate across devices.

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

Copy link
Contributor

@jerry-cheng5 jerry-cheng5 left a comment

Choose a reason for hiding this comment

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

Good work so far, we do need to fix a few things I added some comments.

Also make sure to run the linter, github yells at us if we don't lol

const Layout: React.FC<LayoutProps> = ({ children }) => {
const location = useLocation();

const getPageName = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Use the constants in constants/Routes.ts for the paths.

}
};

return (
Copy link
Contributor

Choose a reason for hiding this comment

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

The navbar is cutting off the top part of pages (user management, dev utility).

We may need some global CSS here.

@vips11 Do you have any recommendations on how to get a global navbar to work without cutting off the actual page content?

Copy link
Contributor

@jerry-cheng5 jerry-cheng5 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

great work on finding a CSS fix!

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