-
Notifications
You must be signed in to change notification settings - Fork 0
Add navbar icons #5 #31
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,26 @@ | ||
| import { NavLink } from 'react-router-dom'; | ||
| import { Network } from 'lucide-react'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nitpick but since both are from the same module, this can be one import line: Also the comment on line 5 can be removed since its just duplicating what the import already says |
||
| import { CalendarDays } from 'lucide-react'; | ||
|
|
||
| // Import Network, CalendarDays | ||
|
|
||
| export default function Header() { | ||
| const linkClass = ({ isActive }: { isActive: boolean }) => | ||
| isActive | ||
| ? 'text-sm font-medium text-red-600' | ||
| : 'text-sm text-gray-600 hover:text-gray-900'; | ||
| ? 'flex items-center gap-1.5 text-sm font-medium text-red-600' | ||
| : 'flex items-center gap-1.5 text-sm text-gray-600 hover:text-gray-900'; | ||
|
|
||
| return ( | ||
| <header className="flex h-14 flex-none items-center gap-6 border-b border-gray-200 bg-white px-6"> | ||
| <span className="font-semibold text-gray-900"> | ||
| Carleton CS Course Graph | ||
| </span> | ||
| <nav className="flex gap-4"> | ||
| <nav className="flex items-center gap-6"> | ||
| <NavLink to="/explorer" className={linkClass}> | ||
| Explorer | ||
| <Network size={20} /> Explorer | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the size of the icons, I think 16 looks better than 20 + it's consistent with the other lucide usage in the site's legend component. Can you please update size to 16 on both |
||
| </NavLink> | ||
| <NavLink to="/planner" className={linkClass}> | ||
| Planner | ||
| <CalendarDays size={20} /> Planner | ||
| </NavLink> | ||
| </nav> | ||
| </header> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a stray package got added unrelated to the ticket change, I'm guessing from a
pnpm add nvmor something. The change doesn't need this so please runpnpm remove nvmon this branch and commit the updatedpackage.jsonandpnpm-lock.yamlAssuming it works as expected there should be no diff for these 2 files against main, so only the Header.tsx file would have changes in the PR.