diff --git a/app/blog/layout.tsx b/app/blog/layout.tsx index dc71d29..5fa41c3 100644 --- a/app/blog/layout.tsx +++ b/app/blog/layout.tsx @@ -1,6 +1,11 @@ import clsx from 'clsx'; +import { Metadata } from 'next'; import { ReactNode } from 'react'; +export const metadata: Metadata = { + title: 'RUA - Blog', +}; + export default function PageLayout({ children }: { children: ReactNode }) { return (
diff --git a/app/blog/page.tsx b/app/blog/page.tsx index c615591..2bfa057 100644 --- a/app/blog/page.tsx +++ b/app/blog/page.tsx @@ -3,11 +3,6 @@ import PostCardLoading from './post-card-loading'; import { PostPerPage, postLists } from 'lib/posts'; import { Fragment, Suspense } from 'react'; import Pagination from 'components/rua/rua-pagination'; -import { Metadata } from 'next'; - -export const metadata: Metadata = { - title: 'RUA - Blog', -}; export default async function Page() { const allPosts = await postLists(); diff --git a/app/gists/layout.tsx b/app/gists/layout.tsx new file mode 100644 index 0000000..2c1688e --- /dev/null +++ b/app/gists/layout.tsx @@ -0,0 +1,32 @@ +import UserInfo from './user-info'; +import { ReactNode, Suspense } from 'react'; +import UserInfoLoading from './user-info-skeleton'; +import { Metadata } from 'next'; + +export const revalidate = 600; +export const metadata: Metadata = { + title: 'RUA - Gists', +}; + +export default async function PageLayout({ + children, +}: { + children: ReactNode; +}) { + return ( + <> +
+
+ }> + {/* @ts-expect-error Async Server Component */} + + + +
+ {children} +
+
+
+ + ); +} diff --git a/app/gists/page.tsx b/app/gists/page.tsx index 88a45c9..04fe5b4 100644 --- a/app/gists/page.tsx +++ b/app/gists/page.tsx @@ -1,16 +1,9 @@ import { getGists } from 'lib/fetcher'; import { notFound } from 'next/navigation'; -import UserInfo from './user-info'; -import { Suspense } from 'react'; import Pagination from 'components/rua/rua-pagination'; import FileContent from './file-content'; -import UserInfoLoading from './user-info-skeleton'; -import { Metadata } from 'next'; export const revalidate = 600; -export const metadata: Metadata = { - title: 'RUA - Gists', -}; export default async function Page() { const gists = await getGists(); @@ -22,27 +15,16 @@ export default async function Page() { return ( <> -
-
- }> - {/* @ts-expect-error Async Server Component */} - - - -
- - -
-
-
+ + ); }