Skip to content

Commit

Permalink
refactor(app): change route structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Javan-Odhiambo committed May 30, 2024
1 parent e56f93e commit 436fb74
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
12 changes: 5 additions & 7 deletions src/app/dashboard/innovation/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,8 @@ const InnovationDetailPage = ({ params }: InnovationDetailPageProps) => {
<DropdownMenuContent className="w-56">
<DropdownMenuItem>
<SquarePen className="mr-2 h-4 w-4" />
<Link href={""}>
{" "}
{/*TODO: Add edit page link */}
{/* TODO: URL generator */}
<Link href={`/dashboard/innovation/edit/${id}`}>
<span>Edit</span>
</Link>
</DropdownMenuItem>
Expand Down Expand Up @@ -301,14 +300,13 @@ const InnovationDetailPage = ({ params }: InnovationDetailPageProps) => {
</div>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-56">
<DropdownMenuItem>
{/* <DropdownMenuItem>
<SquarePen className="mr-2 h-4 w-4" />
// TODO: Comment Editing
<Link href={""}>
{" "}
{/*TODO: Add edit page link */}
<span>Edit</span>
</Link>
</DropdownMenuItem>
</DropdownMenuItem> */}
<DropdownMenuItem className="hover:bg-destructive active:bg-destructive focus:bg-destructive hover:text-white active:text-white focus:text-white">
<Trash2 className="mr-2 h-4 w-4" />
<span>Delete</span>
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/sidebarNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const SidebarNav = () => {
label: "Home"
},
{
href: "/dashboard/new",
href: "/dashboard/innovation/new",
icon: Plus,
label: "New Project"
},
Expand Down
10 changes: 1 addition & 9 deletions src/components/ui/projectcard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,8 @@ const ProjectCard = ({
<DropdownMenuItem onSelect={handleEditClick}>
<SquarePen className="mr-2 h-4 w-4" />
<Link
href={{
pathname: "/dashboard/new",
query: {
id: innovationId,
},
}}
href={`/dashboard/innovation/edit/${innovationId}`}
>
{" "}
{/*TODO: Add edit page link */}
{/* <span>Edit</span> */}
Edit
</Link>
</DropdownMenuItem>
Expand Down

0 comments on commit 436fb74

Please sign in to comment.