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

Added Director Nav Links #65

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Open

Conversation

Jacob-GHub
Copy link
Collaborator

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

Screenshot 2024-11-05 at 2 38 15 PM

The Routes: src > data > director

export const links = [
  {
    name: "Director",
    link: "",
  },
  {
    name: "Applications",
    link: "/director/:program/application",
  },
  {
    name: "Leads",
    link: "/director/leads",
  },
  {
    name: "Directors",
    link: "/director/:program/profile/:uid",
  },
  {
    name: "Assignments",
    link: "/director/:program/assignments",
  },
  {
    name: "View Teams",
    link: "/director/:program/view",
  },
  {
    name: "Email",
    link: "/director/contacts",
  },
];

@shahdivyank
Copy link
Contributor

attach issue

@Jacob-GHub Jacob-GHub linked an issue Nov 6, 2024 that may be closed by this pull request
@@ -0,0 +1,9 @@
const Page = () => {
Copy link
Contributor

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

},
{
name: "Applications",
link: "/director/:program/application",
Copy link
Contributor

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

const segments = pathname.split("/");
const navigation = links.map(({ name, link }) => ({
name,
link: link(segments[2], segments[4]),
Copy link
Contributor

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

},
{
name: "Applications",
link: (program: string) => `/director/${program}/application`,
Copy link
Contributor

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
<div className="h-full">
<Navigation links={links} />
<div className="flex h-full">
<Navigation links={navigation} />
Copy link
Contributor

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

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

Successfully merging this pull request may close these issues.

Add Director Nav Links
2 participants