Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
Merge branch 'main' into 153/157/GroupLink
Marc Seitzbd34e17a6cf4
diff --cc components/links/links-table.tsxindex be299865,b446d35f..492b5195--- a/components/links/links-table.tsx+++ b/components/links/links-table.tsx@@@ -74,9 -75,35 +75,38 @@@ export default function LinksTable(const router = useRouter();const { plan } = usePlan();const teamInfo = useTeam();+ const { groupId } = router.query as {+ groupId?: string;+ };++ const processedLinks = useMemo(() => {+ if (!links?.length) return [];++ const oneMinuteAgo = subMinutes(now, 1);+ const sortedLinks = links.sort(+ (a, b) =>+ new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),+ );++ return sortedLinks.map((link) => {+ const createdDate = new Date(link.createdAt);+ const updatedDate = new Date(link.updatedAt);++ return {+ ...link,+ isNew: isWithinInterval(createdDate, {+ start: oneMinuteAgo,+ end: now,+ }),+ isUpdated:+ isWithinInterval(updatedDate, {+ start: oneMinuteAgo,+ end: now,+ }) && updatedDate.getTime() !== createdDate.getTime(),+ };+ });+ }, [links, now]);+const { canAddLinks } = useLimits();const { data: features } = useSWR<{embedding: boolean;