From 63678b7f1e1c4c8db6d6da983cd4611c2393fe46 Mon Sep 17 00:00:00 2001 From: Isaac Wise Date: Sun, 18 Aug 2024 13:06:36 -0500 Subject: [PATCH] format --- components/CollectionCard.tsx | 8 ++-- .../ModalContent/PreservedFormatsModal.tsx | 11 +++--- components/PreserverdFormatRow.tsx | 7 ++-- pages/collections/[id].tsx | 39 ++++++++++--------- pages/public/collections/[id].tsx | 31 ++++++++------- pages/settings/account.tsx | 26 ++++++------- 6 files changed, 64 insertions(+), 58 deletions(-) diff --git a/components/CollectionCard.tsx b/components/CollectionCard.tsx index abcdfa4..4ff9677 100644 --- a/components/CollectionCard.tsx +++ b/components/CollectionCard.tsx @@ -158,9 +158,11 @@ export default function CollectionCard({ diff --git a/components/ModalContent/PreservedFormatsModal.tsx b/components/ModalContent/PreservedFormatsModal.tsx index 5f5333f..5a0983c 100644 --- a/components/ModalContent/PreservedFormatsModal.tsx +++ b/components/ModalContent/PreservedFormatsModal.tsx @@ -135,9 +135,9 @@ export default function PreservedFormatsModal({ onClose, link }: Props) {

{t("preserved_formats")}

{screenshotAvailable(link) || - pdfAvailable(link) || - readabilityAvailable(link) || - monolithAvailable(link) ? ( + pdfAvailable(link) || + readabilityAvailable(link) || + monolithAvailable(link) ? (

{t("available_formats")}

) : ( "" @@ -214,8 +214,9 @@ export default function PreservedFormatsModal({ onClose, link }: Props) { )}
@@ -78,4 +79,4 @@ export default function PreservedFormatRow({
); -} \ No newline at end of file +} diff --git a/pages/collections/[id].tsx b/pages/collections/[id].tsx index 4d7fc20..e3fe442 100644 --- a/pages/collections/[id].tsx +++ b/pages/collections/[id].tsx @@ -102,8 +102,9 @@ export default function Index() {
{activeCollection && ( @@ -231,20 +232,20 @@ export default function Index() {

{activeCollection.members.length > 0 && - activeCollection.members.length === 1 + activeCollection.members.length === 1 ? t("by_author_and_other", { - author: collectionOwner.name, - count: activeCollection.members.length, - }) - : activeCollection.members.length > 0 && - activeCollection.members.length !== 1 - ? t("by_author_and_others", { author: collectionOwner.name, count: activeCollection.members.length, }) + : activeCollection.members.length > 0 && + activeCollection.members.length !== 1 + ? t("by_author_and_others", { + author: collectionOwner.name, + count: activeCollection.members.length, + }) : t("by_author", { - author: collectionOwner.name, - })} + author: collectionOwner.name, + })}

@@ -289,15 +290,15 @@ export default function Index() { setSortBy={setSortBy} editMode={ permissions === true || - permissions?.canUpdate || - permissions?.canDelete + permissions?.canUpdate || + permissions?.canDelete ? editMode : undefined } setEditMode={ permissions === true || - permissions?.canUpdate || - permissions?.canDelete + permissions?.canUpdate || + permissions?.canDelete ? setEditMode : undefined } @@ -305,11 +306,11 @@ export default function Index() {

{activeCollection?._count?.links === 1 ? t("showing_count_result", { - count: activeCollection?._count?.links, - }) + count: activeCollection?._count?.links, + }) : t("showing_count_results", { - count: activeCollection?._count?.links, - })} + count: activeCollection?._count?.links, + })}

diff --git a/pages/public/collections/[id].tsx b/pages/public/collections/[id].tsx index b701651..98153cb 100644 --- a/pages/public/collections/[id].tsx +++ b/pages/public/collections/[id].tsx @@ -100,8 +100,9 @@ export default function PublicCollections() {
{collection && ( @@ -172,20 +173,20 @@ export default function PublicCollections() {

{collection.members.length > 0 && - collection.members.length === 1 + collection.members.length === 1 ? t("by_author_and_other", { - author: collectionOwner.name, - count: collection.members.length, - }) - : collection.members.length > 0 && - collection.members.length !== 1 - ? t("by_author_and_others", { author: collectionOwner.name, count: collection.members.length, }) + : collection.members.length > 0 && + collection.members.length !== 1 + ? t("by_author_and_others", { + author: collectionOwner.name, + count: collection.members.length, + }) : t("by_author", { - author: collectionOwner.name, - })} + author: collectionOwner.name, + })}

@@ -209,11 +210,11 @@ export default function PublicCollections() { placeholder={ collection._count?.links === 1 ? t("search_count_link", { - count: collection._count?.links, - }) + count: collection._count?.links, + }) : t("search_count_links", { - count: collection._count?.links, - }) + count: collection._count?.links, + }) } /> diff --git a/pages/settings/account.tsx b/pages/settings/account.tsx index 488437f..70d01f2 100644 --- a/pages/settings/account.tsx +++ b/pages/settings/account.tsx @@ -30,19 +30,19 @@ export default function Account() { !objectIsEmpty(account) ? account : ({ - // @ts-ignore - id: null, - name: "", - username: "", - email: "", - emailVerified: null, - password: undefined, - image: "", - isPrivate: true, - // @ts-ignore - createdAt: null, - whitelistedUsers: [], - } as unknown as AccountSettings) + // @ts-ignore + id: null, + name: "", + username: "", + email: "", + emailVerified: null, + password: undefined, + image: "", + isPrivate: true, + // @ts-ignore + createdAt: null, + whitelistedUsers: [], + } as unknown as AccountSettings) ); const { t } = useTranslation();