⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
fixes + improvements
Daniel632548e54add
diff --git a/components/Dashboard/LinkItem.tsx b/components/Dashboard/LinkItem.tsxindex e93516e6..3e95990f 100644--- a/components/Dashboard/LinkItem.tsx+++ b/components/Dashboard/LinkItem.tsx@@ -21,13 +21,12 @@ import Link from "next/link";import Dropdown from "../Dropdown";import Modal from "../Modal";-export default function ({- link,- count,-}: {+type Props = {link: LinkIncludingCollectionAndTags;count: number;-}) {+};++export default function ({ link, count }: Props) {const [expandDropdown, setExpandDropdown] = useState(false);const [editModal, setEditModal] = useState(false);diff --git a/components/LinkList.tsx b/components/LinkList.tsxindex 772812a9..fea8cff0 100644--- a/components/LinkList.tsx+++ b/components/LinkList.tsx@@ -21,13 +21,12 @@ import Modal from "./Modal";import EditLink from "./Modal/EditLink";import Link from "next/link";-export default function ({- link,- count,-}: {+type Props = {link: LinkIncludingCollectionAndTags;count: number;-}) {+};++export default function ({ link, count }: Props) {const [expandDropdown, setExpandDropdown] = useState(false);const [editModal, setEditModal] = useState(false);diff --git a/pages/collections/[id].tsx b/pages/collections/[id].tsxindex ae27ef67..f75c3ef0 100644--- a/pages/collections/[id].tsx+++ b/pages/collections/[id].tsx@@ -89,14 +89,16 @@ export default function () {setSortedLinks(linksArray.sort((a, b) =>- new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()+ new Date(b.createdAt as string).getTime() -+ new Date(a.createdAt as string).getTime()));else if (sortBy === "Date (Oldest First)")setSortedLinks(linksArray.sort((a, b) =>- new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime()+ new Date(a.createdAt as string).getTime() -+ new Date(b.createdAt as string).getTime()));}, [links, router, collections, sortBy]);diff --git a/types/global.ts b/types/global.tsindex b789c32d..df4e632a 100644--- a/types/global.ts+++ b/types/global.ts@@ -5,7 +5,7 @@import { Collection, Link, Tag, User } from "@prisma/client";-export type OptionalExcluding<T, TRequired extends keyof T> = Partial<T> &+type OptionalExcluding<T, TRequired extends keyof T> = Partial<T> &Pick<T, TRequired>;export interface LinkIncludingCollectionAndTags@@ -33,6 +33,12 @@ export interface CollectionIncludingMembersmembers: Member[];}+export interface AccountSettings extends User {+ profilePic: string | null;+ oldPassword?: string;+ newPassword?: string;+}+export type SearchSettings = {query: string;filter: {@@ -43,9 +49,3 @@ export type SearchSettings = {tags: boolean;};};--export interface AccountSettings extends User {- profilePic: string | null;- oldPassword?: string;- newPassword?: string;-}