From 23f4142414b07c53f03587e125628c828c5aa98c Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Mon, 15 Jan 2024 03:39:53 -0500 Subject: [PATCH] improved responsiveness --- components/LinkViews/LinkList.tsx | 21 ++++++++----------- .../ModalContent/PreservedFormatsModal.tsx | 5 +---- layouts/MainLayout.tsx | 2 +- pages/dashboard.tsx | 10 +++------ 4 files changed, 14 insertions(+), 24 deletions(-) diff --git a/components/LinkViews/LinkList.tsx b/components/LinkViews/LinkList.tsx index e4a91b0..67a75e3 100644 --- a/components/LinkViews/LinkList.tsx +++ b/components/LinkViews/LinkList.tsx @@ -11,6 +11,7 @@ import LinkDate from "@/components/LinkViews/LinkComponents/LinkDate"; import LinkCollection from "@/components/LinkViews/LinkComponents/LinkCollection"; import LinkIcon from "@/components/LinkViews/LinkComponents/LinkIcon"; import Link from "next/link"; +import { isPWA } from "@/lib/client/utils"; type Props = { link: LinkIncludingShortenedCollectionAndTags; @@ -52,16 +53,16 @@ export default function LinkCardCompact({ link, count, className }: Props) { <>
- +
@@ -70,16 +71,13 @@ export default function LinkCardCompact({ link, count, className }: Props) {

-
+
{collection ? ( - <> - - · - + ) : undefined} {link.url ? ( -
- +
+

{shortendURL}

) : ( @@ -87,9 +85,8 @@ export default function LinkCardCompact({ link, count, className }: Props) { {link.type}
)} +
- · -
diff --git a/components/ModalContent/PreservedFormatsModal.tsx b/components/ModalContent/PreservedFormatsModal.tsx index af3053c..5bc181d 100644 --- a/components/ModalContent/PreservedFormatsModal.tsx +++ b/components/ModalContent/PreservedFormatsModal.tsx @@ -217,10 +217,7 @@ export default function PreservedFormatsModal({ onClose, activeLink }: Props) { {link?.collection.ownerId === session.data?.user.id ? ( -
updateArchive()} - > +
updateArchive()}>

Refresh Preserved Formats

diff --git a/layouts/MainLayout.tsx b/layouts/MainLayout.tsx index d1cf902..f0a9190 100644 --- a/layouts/MainLayout.tsx +++ b/layouts/MainLayout.tsx @@ -46,7 +46,7 @@ export default function MainLayout({ children }: Props) {

diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx index 991dd05..6fabf33 100644 --- a/pages/dashboard.tsx +++ b/pages/dashboard.tsx @@ -2,7 +2,6 @@ import useLinkStore from "@/store/links"; import useCollectionStore from "@/store/collections"; import useTagStore from "@/store/tags"; import MainLayout from "@/layouts/MainLayout"; -import LinkCard from "@/components/LinkViews/LinkCard"; import { useEffect, useState } from "react"; import useLinks from "@/hooks/useLinks"; import Link from "next/link"; @@ -279,14 +278,11 @@ export default function Dashboard() { > {links.some((e) => e.pinnedBy && e.pinnedBy[0]) ? (
-
- {links + e.pinnedBy && e.pinnedBy[0]) - .map((e, i) => ) .slice(0, showLinks)} -
+ />
) : (