mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
update nextjs to 13.4.7
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
import LinkAnchor from 'components/mdx/link-anchor';
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import { GistData } from 'lib/fetcher';
|
||||
import Link from 'next/link';
|
||||
import { memo } from 'react';
|
||||
import GistsCode from './gists-code';
|
||||
import { GistData } from 'types';
|
||||
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
@ -19,13 +19,13 @@ const FileContent = ({ gists }: Props) => {
|
||||
{gists.map((g) => (
|
||||
<div key={g.id}>
|
||||
{Object.keys(g.files).map((f) => (
|
||||
<div key={g.files[f].raw_url} className="pb-4 ">
|
||||
<div key={g.files[f]?.raw_url} className="pb-4 ">
|
||||
{/* Username and file name */}
|
||||
<h1 className="md:text-lg">
|
||||
{g.login} /
|
||||
<Link href={`/g/${g.id}`}>
|
||||
<LinkAnchor external={false}>
|
||||
{g.files[f].filename}
|
||||
{g.files[f]?.filename}
|
||||
</LinkAnchor>
|
||||
</Link>
|
||||
</h1>
|
||||
@ -36,7 +36,7 @@ const FileContent = ({ gists }: Props) => {
|
||||
{/* Description */}
|
||||
<p className="text-gray-500">{g.description}</p>
|
||||
|
||||
<GistsCode file={g.files[f]} />
|
||||
{g.files[f] && <GistsCode file={g!.files[f]!} />}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
@ -18,7 +18,6 @@ export default async function PageLayout({
|
||||
<main className="max-w-5xl px-4 mx-auto lg:px-0">
|
||||
<div className="md:flex">
|
||||
<Suspense fallback={<UserInfoLoading />}>
|
||||
{/* @ts-expect-error Async Server Component */}
|
||||
<UserInfo />
|
||||
</Suspense>
|
||||
|
||||
|
Reference in New Issue
Block a user