diff --git a/components/AccentSubmitButton.tsx b/components/AccentSubmitButton.tsx
index 37f437f..1d87787 100644
--- a/components/AccentSubmitButton.tsx
+++ b/components/AccentSubmitButton.tsx
@@ -1,9 +1,5 @@
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { IconProp } from "@fortawesome/fontawesome-svg-core";
-
type Props = {
onClick?: Function;
- icon?: IconProp;
label: string;
loading?: boolean;
className?: string;
@@ -12,7 +8,6 @@ type Props = {
export default function AccentSubmitButton({
onClick,
- icon,
label,
loading,
className,
@@ -28,7 +23,6 @@ export default function AccentSubmitButton({
if (loading !== undefined && !loading && onClick) onClick();
}}
>
- {icon &&
{label}
); diff --git a/components/AnnouncementBar.tsx b/components/AnnouncementBar.tsx index e20d3d9..839a438 100644 --- a/components/AnnouncementBar.tsx +++ b/components/AnnouncementBar.tsx @@ -1,5 +1,3 @@ -import { faClose } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Link from "next/link"; import React, { MouseEventHandler } from "react"; @@ -24,10 +22,12 @@ export default function AnnouncementBar({ toggleAnnouncementBar }: Props) { diff --git a/components/Checkbox.tsx b/components/Checkbox.tsx index 5c95bbe..cd69f93 100644 --- a/components/Checkbox.tsx +++ b/components/Checkbox.tsx @@ -1,5 +1,3 @@ -import { faSquare, faSquareCheck } from "@fortawesome/free-regular-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { ChangeEventHandler } from "react"; type Props = { diff --git a/components/CollectionCard.tsx b/components/CollectionCard.tsx index 97e0b63..f3615e2 100644 --- a/components/CollectionCard.tsx +++ b/components/CollectionCard.tsx @@ -1,10 +1,7 @@ -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faEllipsis, faGlobe, faLink } from "@fortawesome/free-solid-svg-icons"; import Link from "next/link"; import { CollectionIncludingMembersAndLinkCount } from "@/types/global"; -import { useEffect, useState } from "react"; +import React, { useEffect, useState } from "react"; import ProfilePhoto from "./ProfilePhoto"; -import { faCalendarDays } from "@fortawesome/free-regular-svg-icons"; import usePermissions from "@/hooks/usePermissions"; import useLocalSettingsStore from "@/store/localSettings"; import getPublicUserData from "@/lib/client/getPublicUserData"; @@ -71,9 +68,10 @@ export default function CollectionCard({ collection, className }: Props) { role="button" className="btn btn-ghost btn-sm btn-square text-neutral" > -
-
{1}
-- {unescapeString(link.name as string)} -
-Landing Pages ⚡️
-{shortendURL}
- -{formattedDate}
-Edit
-Preserved Formats
-Delete
-{shortendURL}
{collection?.name}
{formattedDate}
Color
{collectionOwner.name}
-@{collectionOwner.username}
{collectionOwner.name}
Screenshot
@@ -108,10 +101,6 @@ export default function PreservedFormats() { onClick={() => handleDownload(ArchivedFormat.png)} className="cursor-pointer hover:opacity-60 duration-100 p-2 rounded-md" > -View Latest Snapshot on archive.org
diff --git a/components/ModalContent/DeleteCollectionModal.tsx b/components/ModalContent/DeleteCollectionModal.tsx index 29eb737..5407f68 100644 --- a/components/ModalContent/DeleteCollectionModal.tsx +++ b/components/ModalContent/DeleteCollectionModal.tsx @@ -2,11 +2,6 @@ import React, { useEffect, useState } from "react"; import TextInput from "@/components/TextInput"; import useCollectionStore from "@/store/collections"; import toast from "react-hot-toast"; -import { - faRightFromBracket, - faTrashCan, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { CollectionIncludingMembersAndLinkCount } from "@/types/global"; import { useRouter } from "next/router"; import usePermissions from "@/hooks/usePermissions"; @@ -89,19 +84,7 @@ export default function DeleteCollectionModal({Are you sure you want to delete this Link?
Color
{shortendURL}
) : undefined} @@ -122,13 +116,13 @@ export default function EditLinkModal({ onClose, activeLink }: Props) { defaultValue={ link.collection.id ? { - value: link.collection.id, - label: link.collection.name, - } + value: link.collection.id, + label: link.collection.name, + } : { - value: null as unknown as number, - label: "Unorganized", - } + value: null as unknown as number, + label: "Unorganized", + } } /> ) : null} diff --git a/components/ModalContent/NewCollectionModal.tsx b/components/ModalContent/NewCollectionModal.tsx index de0fc98..511769b 100644 --- a/components/ModalContent/NewCollectionModal.tsx +++ b/components/ModalContent/NewCollectionModal.tsx @@ -1,11 +1,9 @@ import React, { useEffect, useState } from "react"; import TextInput from "@/components/TextInput"; import useCollectionStore from "@/store/collections"; -import toast, { Toaster } from "react-hot-toast"; -import { faFolder } from "@fortawesome/free-solid-svg-icons"; +import toast from "react-hot-toast"; import { HexColorPicker } from "react-colorful"; import { Collection } from "@prisma/client"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Modal from "../Modal"; type Props = { @@ -29,27 +27,22 @@ export default function NewCollectionModal({ onClose }: Props) { const { addCollection } = useCollectionStore(); const submit = async () => { - if (!submitLoader) { - setSubmitLoader(true); - if (!collection) return null; + if (submitLoader) return; + if (!collection) return null; - setSubmitLoader(true); + setSubmitLoader(true); - const load = toast.loading("Creating..."); + const load = toast.loading("Creating..."); - let response; + let response = await addCollection(collection as any); + toast.dismiss(load); - response = await addCollection(collection as any); + if (response.ok) { + toast.success("Created!"); + onClose(); + } else toast.error(response.data as string); - toast.dismiss(load); - - if (response.ok) { - toast.success("Created!"); - onClose(); - } else toast.error(response.data as string); - - setSubmitLoader(false); - } + setSubmitLoader(false); }; return ( @@ -75,12 +68,7 @@ export default function NewCollectionModal({ onClose }: Props) {Color
Name
-Tags
-Description
-{optionsExpanded ? "Hide" : "More"} Options
+ {optionsExpanded ? "Hide" : "More"} Options +Name
+Tags
+Description
+
-
Account
Appearance
@@ -79,11 +63,9 @@ export default function SettingsSidebar({ className }: { className?: string }) { : "hover:bg-neutral/20" } duration-100 py-5 px-2 cursor-pointer flex items-center gap-2 w-full rounded-md h-8`} > -Archive
@@ -96,8 +78,9 @@ export default function SettingsSidebar({ className }: { className?: string }) { : "hover:bg-neutral/20" } duration-100 py-5 px-2 cursor-pointer flex items-center gap-2 w-full rounded-md h-8`} > -API Keys
@@ -110,8 +93,9 @@ export default function SettingsSidebar({ className }: { className?: string }) { : "hover:bg-neutral/20" } duration-100 py-5 px-2 cursor-pointer flex items-center gap-2 w-full rounded-md h-8`} > -Password
@@ -125,11 +109,9 @@ export default function SettingsSidebar({ className }: { className?: string }) { : "hover:bg-neutral/20" } duration-100 py-5 px-2 cursor-pointer flex items-center gap-2 w-full rounded-md h-8`} > -Billing
@@ -148,10 +130,9 @@ export default function SettingsSidebar({ className }: { className?: string }) {Help
GitHub
Mastodon
{label}
); diff --git a/layouts/LinkLayout.tsx b/layouts/LinkLayout.tsx deleted file mode 100644 index ddcced1..0000000 --- a/layouts/LinkLayout.tsx +++ /dev/null @@ -1,216 +0,0 @@ -import LinkSidebar from "@/components/LinkSidebar"; -import { ReactNode, useEffect, useState } from "react"; -import ModalManagement from "@/components/ModalManagement"; -import useModalStore from "@/store/modals"; -import { useRouter } from "next/router"; -import ClickAwayHandler from "@/components/ClickAwayHandler"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faChevronLeft } from "@fortawesome/free-solid-svg-icons"; -import useWindowDimensions from "@/hooks/useWindowDimensions"; -import { - faPen, - faBoxesStacked, - faTrashCan, -} from "@fortawesome/free-solid-svg-icons"; -import useLinkStore from "@/store/links"; -import { - CollectionIncludingMembersAndLinkCount, - LinkIncludingShortenedCollectionAndTags, -} from "@/types/global"; -import { useSession } from "next-auth/react"; -import useCollectionStore from "@/store/collections"; -import EditLinkModal from "@/components/ModalContent/EditLinkModal"; -import Link from "next/link"; -import PreservedFormatsModal from "@/components/ModalContent/PreservedFormatsModal"; -import toast from "react-hot-toast"; -import DeleteLinkModal from "@/components/ModalContent/DeleteLinkModal"; - -interface Props { - children: ReactNode; -} - -export default function LinkLayout({ children }: Props) { - const { modal } = useModalStore(); - - const router = useRouter(); - - useEffect(() => { - modal - ? (document.body.style.overflow = "hidden") - : (document.body.style.overflow = "auto"); - }, [modal]); - - const [sidebar, setSidebar] = useState(false); - - const { width } = useWindowDimensions(); - - useEffect(() => { - setSidebar(false); - }, [width]); - - useEffect(() => { - setSidebar(false); - }, [router]); - - const toggleSidebar = () => { - setSidebar(!sidebar); - }; - - const session = useSession(); - const userId = session.data?.user.id; - - const { setModal } = useModalStore(); - - const { links, removeLink } = useLinkStore(); - const { collections } = useCollectionStore(); - - const [linkCollection, setLinkCollection] = - useState{activeCollection?.name}
@@ -126,11 +124,10 @@ export default function Index() { role="button" className="btn btn-ghost btn-sm btn-square text-neutral" > -Import From
- Search Results -
-Import From
Download your data instantly.
Export Data
Select Theme
Dark Theme
+ +Dark
{/*Light Theme
+ +Light
{/*diff --git a/pages/tags/[id].tsx b/pages/tags/[id].tsx index e1d92da..407a92d 100644 --- a/pages/tags/[id].tsx +++ b/pages/tags/[id].tsx @@ -1,12 +1,4 @@ -import LinkCard from "@/components/LinkViews/LinkComponents/LinkCard"; import useLinkStore from "@/store/links"; -import { - faCheck, - faEllipsis, - faHashtag, - faXmark, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useRouter } from "next/router"; import { FormEvent, useEffect, useState } from "react"; import MainLayout from "@/layouts/MainLayout"; @@ -116,11 +108,9 @@ export default function Index() {
{activeTag?.name}
@@ -169,15 +151,11 @@ export default function Index() { }`} >