diff --git a/components/CollectionSelection.tsx b/components/CollectionSelection.tsx
new file mode 100644
index 0000000..47a449f
--- /dev/null
+++ b/components/CollectionSelection.tsx
@@ -0,0 +1,139 @@
+import useCollectionStore from "@/store/collections";
+import { CollectionIncludingMembersAndLinkCount } from "@/types/global";
+import Link from "next/link";
+import { useRouter } from "next/router";
+import React, { useEffect, useState } from "react";
+
+type Props = {
+ links: boolean;
+};
+
+const CollectionSelection = ({ links }: Props) => {
+ const { collections } = useCollectionStore();
+ const [active, setActive] = useState("");
+ const router = useRouter();
+
+ useEffect(() => {
+ setActive(router.asPath);
+ }, [router, collections]);
+
+ return (
+
+ {collections[0] ? (
+ collections
+ .sort((a, b) => a.name.localeCompare(b.name))
+ .filter((e) => e.parentId === null)
+ .map((e, i) => (
+
+ ))
+ ) : (
+
+
+ You Have No Collections...
+
+
+ )}
+
+ );
+};
+
+export default CollectionSelection;
+
+const CollectionItem = ({
+ collection,
+ active,
+ collections,
+}: {
+ collection: CollectionIncludingMembersAndLinkCount;
+ active: string;
+ collections: CollectionIncludingMembersAndLinkCount[];
+}) => {
+ const hasChildren =
+ collection.subCollections && collection.subCollections.length > 0;
+
+ const router = useRouter();
+
+ return hasChildren ? (
+
+
+
+
+
+
{collection.name}
+
+ {collection.isPublic ? (
+
+ ) : undefined}
+
+ {collection._count?.links}
+
+
+
+
+
+ {/* Nested Collections, make it recursively */}
+
+ {hasChildren && (
+
+ {collections
+ .filter((e) => e.parentId === collection.id)
+ .map((subCollection) => (
+
+ ))}
+
+ )}
+
+ ) : (
+
+
+
+
{collection.name}
+
+ {collection.isPublic ? (
+
+ ) : undefined}
+
+ {collection._count?.links}
+
+
+
+ );
+};
diff --git a/components/ModalContent/NewTokenModal.tsx b/components/ModalContent/NewTokenModal.tsx
index 50565ed..2092eaa 100644
--- a/components/ModalContent/NewTokenModal.tsx
+++ b/components/ModalContent/NewTokenModal.tsx
@@ -74,7 +74,7 @@ export default function NewTokenModal({ onClose }: Props) {
-
+
Name
@@ -86,15 +86,15 @@ export default function NewTokenModal({ onClose }: Props) {
/>
-
+
Expires in
-
+
{token.expires === TokenExpiry.sevenDays && "7 Days"}
{token.expires === TokenExpiry.oneMonth && "30 Days"}
@@ -102,7 +102,7 @@ export default function NewTokenModal({ onClose }: Props) {
{token.expires === TokenExpiry.threeMonths && "90 Days"}
{token.expires === TokenExpiry.never && "No Expiration"}
-
-
+