diff --git a/public/icons/crown.svg b/public/icons/crown.svg new file mode 100644 index 00000000..48a8bb40 --- /dev/null +++ b/public/icons/crown.svg @@ -0,0 +1,3 @@ + diff --git a/public/icons/logo.svg b/public/icons/logo.svg new file mode 100644 index 00000000..e01126c0 --- /dev/null +++ b/public/icons/logo.svg @@ -0,0 +1,11 @@ + diff --git a/public/icons/plus.svg b/public/icons/plus.svg new file mode 100644 index 00000000..4b350da7 --- /dev/null +++ b/public/icons/plus.svg @@ -0,0 +1,3 @@ + diff --git a/src/components/Sidebar/DashboardItem.tsx b/src/components/Sidebar/DashboardItem.tsx new file mode 100644 index 00000000..06722d06 --- /dev/null +++ b/src/components/Sidebar/DashboardItem.tsx @@ -0,0 +1,25 @@ +import Image from 'next/image'; +import Link from 'next/link'; + +import crown from '@/../public/icons/crown.svg'; +import { Dashboard } from '@/types/Dashboard.interface'; + +interface DashboardItemProps { + dashboard: Dashboard; + nowDashboard?: number; +} + +export default function DashboardItem({ dashboard, nowDashboard }: DashboardItemProps) { + const isActive = nowDashboard === dashboard.id; + const itemClasses = `flex items-center gap-4 rounded-md px-3 py-3 ${isActive ? 'bg-violet_f1 text-black_33' : 'text-gray_78'} hover:bg-violet_f1`; + + return ( +
{dashboard.title}
+ {dashboard.createdByMe &&