replace svg icon with Lucide icon
This commit is contained in:
3
frontend/app/projects/[projectId]/dashboard/page.tsx
Normal file
3
frontend/app/projects/[projectId]/dashboard/page.tsx
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export default function Page() {
|
||||||
|
return <>This is Dashboard tab</>;
|
||||||
|
}
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export default function Page() {
|
|
||||||
return <>This is Home tab</>;
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { Menu, MenuItem } from "@nextui-org/react";
|
import { Menu, MenuItem } from "@nextui-org/react";
|
||||||
import { HomeIcon, PagesIcon, PlayIcon } from "@/components/icons";
|
import { LayoutDashboard, Files, FlaskConical } from "lucide-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import useGetCurrentIds from "@/utils/useGetCurrentIds";
|
import useGetCurrentIds from "@/utils/useGetCurrentIds";
|
||||||
|
|
||||||
@@ -11,21 +11,21 @@ export default function Sidebar() {
|
|||||||
<div className="w-64 bg-white border-r-1">
|
<div className="w-64 bg-white border-r-1">
|
||||||
<Menu aria-label="sidebar">
|
<Menu aria-label="sidebar">
|
||||||
<MenuItem
|
<MenuItem
|
||||||
startContent={<HomeIcon size={28} />}
|
startContent={<LayoutDashboard strokeWidth={1} size={28} />}
|
||||||
className="p-3"
|
className="p-3"
|
||||||
onClick={() => router.push(`/projects/${projectId}/home`)}
|
onClick={() => router.push(`/projects/${projectId}/dashboard`)}
|
||||||
>
|
>
|
||||||
Home
|
Dashboard
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
startContent={<PagesIcon size={28} />}
|
startContent={<Files strokeWidth={1} size={28} />}
|
||||||
className="p-3"
|
className="p-3"
|
||||||
onClick={() => router.push(`/projects/${projectId}/folders`)}
|
onClick={() => router.push(`/projects/${projectId}/folders`)}
|
||||||
>
|
>
|
||||||
Test Cases
|
Test Cases
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
startContent={<PlayIcon size={28} />}
|
startContent={<FlaskConical strokeWidth={1} size={28} />}
|
||||||
className="p-3"
|
className="p-3"
|
||||||
onClick={() => router.push(`/projects/${projectId}/runs`)}
|
onClick={() => router.push(`/projects/${projectId}/runs`)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
CardBody,
|
CardBody,
|
||||||
Divider,
|
Divider,
|
||||||
} from "@nextui-org/react";
|
} from "@nextui-org/react";
|
||||||
import { DotsIcon } from "@/components/icons";
|
import { MoreVertical } from "lucide-react";
|
||||||
|
|
||||||
export function ProjectCard({ project, onEditClicked, onDeleteClicked }) {
|
export function ProjectCard({ project, onEditClicked, onDeleteClicked }) {
|
||||||
return (
|
return (
|
||||||
@@ -19,13 +19,13 @@ export function ProjectCard({ project, onEditClicked, onDeleteClicked }) {
|
|||||||
<CardHeader className="flex gap-3 h-[50px] justify-between text-ellipsis overflow-hidden">
|
<CardHeader className="flex gap-3 h-[50px] justify-between text-ellipsis overflow-hidden">
|
||||||
<div className="flex gap-5">
|
<div className="flex gap-5">
|
||||||
<div className="flex flex-col gap-1 items-start justify-center">
|
<div className="flex flex-col gap-1 items-start justify-center">
|
||||||
<Link href={`/projects/${project.id}/home`}>{project.name}</Link>
|
<Link href={`/projects/${project.id}/dashboard`}>{project.name}</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Dropdown>
|
<Dropdown>
|
||||||
<DropdownTrigger>
|
<DropdownTrigger>
|
||||||
<Button isIconOnly variant="light" size="sm">
|
<Button isIconOnly size="sm" className="bg-transparent rounded-full">
|
||||||
<DotsIcon size={16} />
|
<MoreVertical size={16} />
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownTrigger>
|
</DropdownTrigger>
|
||||||
<DropdownMenu aria-label="Static Actions">
|
<DropdownMenu aria-label="Static Actions">
|
||||||
|
|||||||
@@ -184,103 +184,3 @@ export const SearchIcon = (props: IconSvgProps) => (
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
|
|
||||||
export const HomeIcon: React.FC<IconSvgProps> = ({
|
|
||||||
size = 24,
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
...props
|
|
||||||
}) => {
|
|
||||||
return (
|
|
||||||
<svg
|
|
||||||
viewBox="0 0 21 21"
|
|
||||||
fill="currentColor"
|
|
||||||
height={size || height}
|
|
||||||
width={size || height}
|
|
||||||
{...props}
|
|
||||||
>
|
|
||||||
<g
|
|
||||||
fill="none"
|
|
||||||
fillRule="evenodd"
|
|
||||||
stroke="currentColor"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M1.5 10.5l9-9 9 9" />
|
|
||||||
<path d="M3.5 8.5v7a2 2 0 002 2h10a2 2 0 002-2v-7" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const PagesIcon: React.FC<IconSvgProps> = ({
|
|
||||||
size = 24,
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
...props
|
|
||||||
}) => {
|
|
||||||
return (
|
|
||||||
<svg
|
|
||||||
viewBox="0 0 21 21"
|
|
||||||
fill="currentColor"
|
|
||||||
height={size || height}
|
|
||||||
width={size || height}
|
|
||||||
{...props}
|
|
||||||
>
|
|
||||||
<g
|
|
||||||
fill="none"
|
|
||||||
fillRule="evenodd"
|
|
||||||
stroke="currentColor"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M15.5 3.5h-7a2 2 0 00-2 2v9a2 2 0 002 2h7a2 2 0 002-2v-9a2 2 0 00-2-2z" />
|
|
||||||
<path d="M6.5 5.5a2 2 0 00-2 2v8a3 3 0 003 3h6a2 2 0 002-2" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const PlayIcon: React.FC<IconSvgProps> = ({
|
|
||||||
size = 24,
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
...props
|
|
||||||
}) => {
|
|
||||||
return (
|
|
||||||
<svg
|
|
||||||
viewBox="0 0 512 512"
|
|
||||||
fill="currentColor"
|
|
||||||
height={size || height}
|
|
||||||
width={size || height}
|
|
||||||
{...props}
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
strokeMiterlimit={10}
|
|
||||||
strokeWidth={32}
|
|
||||||
d="M112 111v290c0 17.44 17 28.52 31 20.16l247.9-148.37c12.12-7.25 12.12-26.33 0-33.58L143 90.84c-14-8.36-31 2.72-31 20.16z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const DotsIcon: React.FC<IconSvgProps> = ({
|
|
||||||
size = 24,
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
...props
|
|
||||||
}) => {
|
|
||||||
return (
|
|
||||||
<svg
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="currentColor"
|
|
||||||
height={size || height}
|
|
||||||
width={size || height}
|
|
||||||
{...props}
|
|
||||||
>
|
|
||||||
<path d="M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" />
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user