diff --git a/components/common/ListCompactor.tsx b/components/common/ListCompactor.tsx new file mode 100644 index 0000000..286dccb --- /dev/null +++ b/components/common/ListCompactor.tsx @@ -0,0 +1,33 @@ +"use client"; + +import { FC, useState } from "react"; +import { Button } from "../ui/button"; + +export function ListCompactor({ + data, + Component, +}: { + data: T[]; + Component: FC<{ item: T }>; +}) { + const [limit, setLimit] = useState(5); + + return ( + <> + {data.length === 0 && ( +

Empty List

+ )} + {data.slice(0, limit).map((item, index) => ( + + ))} + {limit < data.length && ( + + )} + + ); +} diff --git a/components/common/NavigateBack.tsx b/components/common/NavigateBack.tsx index b8ede47..73390c7 100644 --- a/components/common/NavigateBack.tsx +++ b/components/common/NavigateBack.tsx @@ -7,7 +7,7 @@ export function NavigateBack() { const router = useRouter(); return ( - ); diff --git a/components/common/NavigationLinks.tsx b/components/common/NavigationLinks.tsx new file mode 100644 index 0000000..32d871d --- /dev/null +++ b/components/common/NavigationLinks.tsx @@ -0,0 +1,68 @@ +import Link from "next/link"; +import { buttonVariants } from "../ui/button"; +import { + Eye, + Globe2, + Home, + ScrollText, + Search, + Siren, + Sparkles, + TrendingUp, +} from "lucide-react"; + +export function NavigationLinks() { + return ( + <> + + + + + + + + + + + + + + + + + + + + + + + + + + ); +} diff --git a/components/common/NavigationToolbar.tsx b/components/common/NavigationToolbar.tsx new file mode 100644 index 0000000..6d8d0cf --- /dev/null +++ b/components/common/NavigationToolbar.tsx @@ -0,0 +1,56 @@ +"use client"; + +import { useRouter } from "next/navigation"; +import { Button } from "../ui/button"; +import { ArrowLeft, Star } from "lucide-react"; +import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover"; +import { Label } from "../ui/label"; +import { Input } from "../ui/input"; + +export function NavigationToolbar({ children }: { children: string }) { + const router = useRouter(); + const savedAsBookmark = false; + + return ( +
+ + + + + + +
+
+

Bookmark

+

+ You've saved this page for later. +

+
+
+
+ + +
+ {savedAsBookmark ? ( + <> + + + + ) : ( + + )} +
+
+
+
+

{children}

+
+ ); +}