Format code

This commit is contained in:
DefectingCat
2023-03-22 15:34:59 +08:00
parent b47519256f
commit d1adac91d7
6 changed files with 7 additions and 23 deletions

View File

@ -1,12 +1,10 @@
import LinkAnchor from 'components/mdx/link-anchor';
import Loading from 'components/rua/loading/rua-loading';
import dayjs from 'dayjs';
import { GistData } from 'lib/fetcher';
import dynamic from 'next/dynamic';
import Link from 'next/link';
import { memo, Suspense } from 'react';
import GistsCode from './gists-code';
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';
dayjs.extend(relativeTime);

View File

@ -1,17 +1,5 @@
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import dynamic from 'next/dynamic';
import { Suspense } from 'react';
import clsx from 'clsx';
const GistsCode = dynamic(
() => import('components/gists/gists-code-skeleton'),
{
suspense: true,
}
);
dayjs.extend(relativeTime);
// import GistsCode from './gists-code';
const GistSkeleton = () => {
return (
@ -48,9 +36,7 @@ const GistSkeleton = () => {
<span className={'w-16 animate-pulse'}></span>
</p>
<Suspense fallback>
<GistsCode />
</Suspense>
{/* <GistsCode /> */}
</div>
</div>
</main>

View File

@ -2,8 +2,8 @@ import { getGists } from 'lib/fetcher';
import { notFound } from 'next/navigation';
import UserInfo from './user-info';
import { Suspense } from 'react';
import FileContent from 'components/gists/file-content';
import Pagination from 'components/rua/rua-pagination';
import FileContent from './file-content';
export default async function Page() {
const gists = await getGists();