-
Notifications
You must be signed in to change notification settings - Fork 5
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
Added Director Nav Links #65
base: dev
Are you sure you want to change the base?
Conversation
attach issue |
@@ -0,0 +1,9 @@ | |||
const Page = () => { |
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.
do not add the pages yet, just need the navigation
src/data/director/navigation.tsx
Outdated
}, | ||
{ | ||
name: "Applications", | ||
link: "/director/:program/application", |
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.
if the link is dynamic, we should instead make each link a function which returns a string for the dynamically generated url
src/app/director/layout.tsx
Outdated
const segments = pathname.split("/"); | ||
const navigation = links.map(({ name, link }) => ({ | ||
name, | ||
link: link(segments[2], segments[4]), |
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.
what happens when segments 2 and 4 dont exist? there should be a fallback
src/data/director/navigation.tsx
Outdated
}, | ||
{ | ||
name: "Applications", | ||
link: (program: string) => `/director/${program}/application`, |
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.
prolly want all the functions to be the same parameter wise so it gives less problems
gnite and uid123, also made it so that static link segments wont feed into dynamic links
src/app/director/layout.tsx
Outdated
<div className="h-full"> | ||
<Navigation links={links} /> | ||
<div className="flex h-full"> | ||
<Navigation links={navigation} /> |
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.
logic should be handled inside navigation
Added new routes and ignored the initial "director" section. I followed the routes on figma, but I was unsure if this was the correct route for the "directors" section
The Routes: src > data > director