import useCollectionStore from "@/store/collections"; import { faChartSimple, faChevronDown, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import MainLayout from "@/layouts/MainLayout"; import useLinkStore from "@/store/links"; import useTagStore from "@/store/tags"; import LinkCard from "@/components/LinkCard"; import Link from "next/link"; import CollectionCard from "@/components/CollectionCard"; import { Disclosure, Transition } from "@headlessui/react"; import { useEffect, useState } from "react"; export default function Dashboard() { const { collections } = useCollectionStore(); const { links } = useLinkStore(); const { tags } = useTagStore(); const [tagPinDisclosure, setTagPinDisclosure] = useState(() => { const storedValue = localStorage.getItem("tagPinDisclosure"); return storedValue ? storedValue === "true" : true; }); const [collectionPinDisclosure, setCollectionPinDisclosure] = useState(() => { const storedValue = localStorage.getItem("collectionPinDisclosure"); return storedValue ? storedValue === "true" : true; }); const [linkPinDisclosure, setLinkPinDisclosure] = useState(() => { const storedValue = localStorage.getItem("linkPinDisclosure"); return storedValue ? storedValue === "true" : true; }); useEffect(() => { localStorage.setItem( "tagPinDisclosure", tagPinDisclosure ? "true" : "false" ); }, [tagPinDisclosure]); useEffect(() => { localStorage.setItem( "collectionPinDisclosure", collectionPinDisclosure ? "true" : "false" ); }, [collectionPinDisclosure]); useEffect(() => { localStorage.setItem( "linkPinDisclosure", linkPinDisclosure ? "true" : "false" ); }, [linkPinDisclosure]); return ( // ml-80

Dashboard

{links.length}

Links {/* {links.length == 1 ? "Links" : "Link"} */}

{collections.length}

Collections

{tags.length}

Tags

{/*
*/}
{ setLinkPinDisclosure(!linkPinDisclosure); }} className="flex justify-between gap-2 items-baseline shadow active:shadow-inner duration-100 py-2 px-4 rounded-full" >

Pinned Links

{linkPinDisclosure ? "Hide" : "Show"}
{links.slice(0, 5).map((e, i) => ( ))}
{ setCollectionPinDisclosure(!collectionPinDisclosure); }} className="flex justify-between gap-2 items-baseline shadow active:shadow-inner duration-100 py-2 px-4 rounded-full" >

Pinned Collections

{collectionPinDisclosure ? "Hide" : "Show"}
{collections.slice(0, 5).map((e, i) => ( ))}
{ setTagPinDisclosure(!tagPinDisclosure); }} className="flex justify-between gap-2 items-baseline shadow active:shadow-inner duration-100 py-2 px-4 rounded-full" >

Pinned Tags

{tagPinDisclosure ? "Hide" : "Show"}
{tags.slice(0, 19).map((e, i) => ( {e.name} ))}
); }