Collection Page
{userId && (
-
+
+ Update Collection
+
)}
@@ -69,7 +70,7 @@ const CollectionPage = async ({ params, searchParams }: Props) => {
);
}}
-
+ >
);
};
diff --git a/apps/resources/app/collections/page.tsx b/apps/resources/app/collections/page.tsx
index e0d66b44..692159c9 100644
--- a/apps/resources/app/collections/page.tsx
+++ b/apps/resources/app/collections/page.tsx
@@ -1,23 +1,21 @@
import { auth } from '@clerk/nextjs';
import { Await } from 'components/Await/Await';
-import { Page } from 'components/Page/Page';
-import { Heading, Text } from 'design-system';
+import { AddCollectionDialog } from 'components/Collections/AddCollectionDialog/AddCollectionDialog';
+import { Button, Heading, Text } from 'design-system';
import { getCollectionsCached } from 'lib/cache';
-import { SearchParams } from 'lib/types';
import Link from 'next/link';
-import { AddCollectionButton } from '../../components/Collections/AddCollectionButton';
-interface Props {
- searchParams: SearchParams;
-}
-
-const CollectionsPage = async ({ searchParams }: Props) => {
+const CollectionsPage = async () => {
const promise = getCollectionsCached();
const { userId } = auth();
return (
-
+ <>
Collections
- {userId && }
+ {userId && (
+
+ Add Collection
+
+ )}
{(collections) => {
return (
@@ -39,7 +37,7 @@ const CollectionsPage = async ({ searchParams }: Props) => {
);
}}
-
+ >
);
};
diff --git a/apps/resources/app/imprint/page.tsx b/apps/resources/app/imprint/page.tsx
index ea7e1bc1..f749c709 100644
--- a/apps/resources/app/imprint/page.tsx
+++ b/apps/resources/app/imprint/page.tsx
@@ -1,31 +1,23 @@
-import { Page } from 'components/Page/Page';
import { allPages } from 'contentlayer/generated';
import { Heading } from 'design-system';
-import { SearchParams } from 'lib/types';
import { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Imprint',
};
-interface Props {
- searchParams: SearchParams;
-}
-
-const ImprintPage = ({ searchParams }: Props) => {
+const ImprintPage = () => {
const content = allPages.find((page) => page.title === 'Imprint');
return (
-
-
-
- {content?.title}
-
-
-
-
+
+
+ {content?.title}
+
+
+
);
};
diff --git a/apps/resources/app/privacy/page.tsx b/apps/resources/app/privacy/page.tsx
index 1f79f9bf..64e8f2ad 100644
--- a/apps/resources/app/privacy/page.tsx
+++ b/apps/resources/app/privacy/page.tsx
@@ -1,31 +1,23 @@
-import { Page } from 'components/Page/Page';
import { allPages } from 'contentlayer/generated';
import { Heading } from 'design-system';
-import { SearchParams } from 'lib/types';
import { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Privacy Policy',
};
-interface Props {
- searchParams: SearchParams;
-}
-
-const PrivacyPage = ({ searchParams }: Props) => {
+const PrivacyPage = () => {
const content = allPages.find((page) => page.title === 'Privacy');
return (
-
-
-
- {content?.title}
-
-
-
-
+
+
+ {content?.title}
+
+
+
);
};
diff --git a/apps/resources/app/profile/page.tsx b/apps/resources/app/profile/page.tsx
index d14863da..b63df679 100644
--- a/apps/resources/app/profile/page.tsx
+++ b/apps/resources/app/profile/page.tsx
@@ -4,45 +4,37 @@ import {
SignedOut,
UserProfile,
} from '@clerk/nextjs';
-import { Page } from 'components/Page/Page';
import { Heading } from 'design-system';
-import { SearchParams } from 'lib/types';
import { DeleteAccountButton } from './DeleteAccountButton';
-interface Props {
- searchParams: SearchParams;
-}
-
-const ProfilePage = ({ searchParams }: Props) => {
+const ProfilePage = () => {
return (
-
-
-
- Profile
-
-
+
+
+ Profile
+
+
+
+
+
+
+
+
);
};
diff --git a/apps/resources/app/resources/[slug]/page.tsx b/apps/resources/app/resources/[slug]/page.tsx
index 3bce480e..65d60f17 100644
--- a/apps/resources/app/resources/[slug]/page.tsx
+++ b/apps/resources/app/resources/[slug]/page.tsx
@@ -1,5 +1,3 @@
-import { Page } from 'components/Page/Page';
-import { SearchParams } from 'lib/types';
import { Comments } from '../../../components/Comments/Comments';
import { NewResources } from '../../../components/NewResources/NewResources';
import { Newsletter } from '../../../components/Newsletter/Newsletter';
@@ -57,21 +55,20 @@ interface Props {
params: {
slug: string;
};
- searchParams: SearchParams;
}
-const ResourcePage = async ({ params, searchParams }: Props) => {
+const ResourcePage = async ({ params }: Props) => {
const { slug } = params;
const { resourceId, resourceType } = parseResourceSlug(slug);
return (
-
+ <>
-
+ >
);
};
diff --git a/apps/resources/app/resources/page.tsx b/apps/resources/app/resources/page.tsx
index 7d7df244..18c602b6 100644
--- a/apps/resources/app/resources/page.tsx
+++ b/apps/resources/app/resources/page.tsx
@@ -1,4 +1,3 @@
-import { Page } from 'components/Page/Page';
import { SearchParams } from 'lib/types';
import { Metadata } from 'next';
import { Resources } from './Resources/Resources';
@@ -14,10 +13,10 @@ interface Props {
const ResourcesPage = ({ searchParams }: Props) => {
return (
-
+ <>
-
+ >
);
};
diff --git a/apps/resources/app/sign-in/[[...sign-in]]/page.tsx b/apps/resources/app/sign-in/[[...sign-in]]/page.tsx
index 1c220a4d..4947c7c6 100644
--- a/apps/resources/app/sign-in/[[...sign-in]]/page.tsx
+++ b/apps/resources/app/sign-in/[[...sign-in]]/page.tsx
@@ -1,44 +1,36 @@
import { SignIn } from '@clerk/nextjs';
-import { Page } from 'components/Page/Page';
import { Heading } from 'design-system';
-import { SearchParams } from 'lib/types';
-interface Props {
- searchParams: SearchParams;
-}
-
-const SignInPage = ({ searchParams }: Props) => {
+const SignInPage = () => {
return (
-
-
-
+
);
};
diff --git a/apps/resources/app/sign-up/[[...sign-up]]/page.tsx b/apps/resources/app/sign-up/[[...sign-up]]/page.tsx
index fe2a6137..5a0e486d 100644
--- a/apps/resources/app/sign-up/[[...sign-up]]/page.tsx
+++ b/apps/resources/app/sign-up/[[...sign-up]]/page.tsx
@@ -1,52 +1,44 @@
import { SignUp } from '@clerk/nextjs';
-import { Page } from 'components/Page/Page';
import { Heading, Link, Text } from 'design-system';
-import { SearchParams } from 'lib/types';
-interface Props {
- searchParams: SearchParams;
-}
-
-const SignUpPage = ({ searchParams }: Props) => {
+const SignUpPage = () => {
return (
-
-
-
- Sign up
-
-
- Sign up for an account to be able to use personalized features like
- liking resources and more.
-
-
-
-
-
- With your registration you declare to have read and to agree with our{' '}
- privacy policy.
-
-
-
+
+
+ Sign up
+
+
+ Sign up for an account to be able to use personalized features like
+ liking resources and more.
+
+
+
+
+
+ With your registration you declare to have read and to agree with our{' '}
+ privacy policy.
+
+
);
};
diff --git a/apps/resources/components/Card/CollectionButton.tsx b/apps/resources/components/Card/CollectionButton.tsx
index b4b47a5c..683f7428 100644
--- a/apps/resources/components/Card/CollectionButton.tsx
+++ b/apps/resources/components/Card/CollectionButton.tsx
@@ -1,7 +1,8 @@
'use client';
-import { AddToCollectionButton } from 'components/Collections/AddToCollectionButton';
+import { AddToCollectionDialog } from 'components/Collections/AddToCollectionDialog/AddToCollectionDialog';
import { AddToThisCollectionButton } from 'components/Collections/AddToThisCollectionButton';
+import { Button } from 'design-system';
import { ContentType } from 'lib/resources';
import { usePathname } from 'next/navigation';
@@ -26,10 +27,12 @@ export const CollectionButton = ({ resourceId, resourceType }: Props) => {
resourceType={resourceType}
/>
) : (
-
+ >
+ Add to collection
+
)}
);
diff --git a/apps/resources/components/Collections/AddCollectionButton.tsx b/apps/resources/components/Collections/AddCollectionButton.tsx
deleted file mode 100644
index 7aecb528..00000000
--- a/apps/resources/components/Collections/AddCollectionButton.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import { useServerDialog } from 'components/ServerDialog/useServerDialog';
-import { Button } from 'design-system';
-
-export const AddCollectionButton = () => {
- const { openDialog, isPending } = useServerDialog();
- return (
-