import ClickAwayHandler from "@/components/ClickAwayHandler"; import { useState } from "react"; import useCollectionStore from "@/store/collections"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faPlus, faFolder, faBox, faHashtag, faBookmark, } from "@fortawesome/free-solid-svg-icons"; import SidebarItem from "./SidebarItem"; import useTagStore from "@/store/tags"; import Link from "next/link"; export default function () { const [collectionInput, setCollectionInput] = useState(false); const { collections, addCollection } = useCollectionStore(); const { tags } = useTagStore(); const toggleCollectionInput = () => { setCollectionInput(!collectionInput); }; const submitCollection = async ( event: React.KeyboardEvent ) => { const collectionName: string = (event.target as HTMLInputElement).value; if (event.key === "Enter" && collectionName) { addCollection(collectionName); (event.target as HTMLInputElement).value = ""; } }; return (

Linkwarden

All Links

All Collections

Collections

{collectionInput ? ( ) : (
)}
{collections.map((e, i) => { return ( } path={`/collections/${e.id}`} /> ); })}

Tags

{tags.map((e, i) => { return ( } path={`/tags/${e.id}`} /> ); })}
); }