mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
chore: upgrade dependencies
This commit is contained in:
@ -9,8 +9,13 @@ export async function generateStaticParams() {
|
||||
return await getPostListPath();
|
||||
}
|
||||
|
||||
export default async function Page({ params }: { params: { page: string } }) {
|
||||
const page = Number(params.page);
|
||||
export default async function Page({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ page: string }>;
|
||||
}) {
|
||||
const { page: pageNumber } = await params;
|
||||
const page = Number(pageNumber);
|
||||
if (!page) notFound();
|
||||
|
||||
const allPosts = await postLists();
|
||||
|
@ -15,12 +15,13 @@ dayjs.extend(relativeTime);
|
||||
export default async function Page({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
params: Promise<{
|
||||
id: string;
|
||||
};
|
||||
}>;
|
||||
}) {
|
||||
if (typeof params.id !== 'string') notFound();
|
||||
const gist = await getSignalGist(params.id);
|
||||
const { id } = await params;
|
||||
if (typeof id !== 'string') notFound();
|
||||
const gist = await getSignalGist(id);
|
||||
if (!gist || !gist.files) notFound();
|
||||
|
||||
return (
|
||||
@ -32,7 +33,7 @@ export default async function Page({
|
||||
priority
|
||||
width={32}
|
||||
height={32}
|
||||
className="rounded-full "
|
||||
className="rounded-lg-full "
|
||||
/>
|
||||
<h1 className="ml-2 overflow-hidden text-xl whitespace-nowrap overflow-ellipsis">
|
||||
<Link href="/gists">
|
||||
|
@ -7,7 +7,7 @@ const loading = () => {
|
||||
<div className="flex items-center py-1 ">
|
||||
<div
|
||||
className={clsx(
|
||||
'w-8 h-8 rounded-full',
|
||||
'w-8 h-8 rounded-lg-full',
|
||||
'bg-gray-200 animate-pulse dark:bg-rua-gray-600',
|
||||
)}
|
||||
></div>
|
||||
@ -21,7 +21,7 @@ const loading = () => {
|
||||
<div
|
||||
className={clsx(
|
||||
'w-32 h-5 bg-gray-200',
|
||||
'animate-pulse rounded-md',
|
||||
'animate-pulse rounded-lg-md',
|
||||
'dark:bg-rua-gray-600',
|
||||
)}
|
||||
></div>
|
||||
@ -29,7 +29,7 @@ const loading = () => {
|
||||
<div
|
||||
className={clsx(
|
||||
'w-32 h-5 bg-gray-200',
|
||||
'animate-pulse rounded-md',
|
||||
'animate-pulse rounded-lg-md',
|
||||
'dark:bg-rua-gray-600',
|
||||
)}
|
||||
></div>
|
||||
@ -40,7 +40,7 @@ const loading = () => {
|
||||
<div
|
||||
className={clsx(
|
||||
'w-32 h-4 bg-gray-200',
|
||||
'animate-pulse rounded-md',
|
||||
'animate-pulse rounded-lg-md',
|
||||
'dark:bg-rua-gray-600',
|
||||
)}
|
||||
></div>
|
||||
|
@ -8,11 +8,12 @@ export const revalidate = 600;
|
||||
export default async function Page({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
params: Promise<{
|
||||
page: string;
|
||||
};
|
||||
}>;
|
||||
}) {
|
||||
const page = Number(params.page);
|
||||
const { page: pageNumber } = await params;
|
||||
const page = Number(pageNumber);
|
||||
if (!page) notFound();
|
||||
const gists = await getGists(page);
|
||||
if (!gists) notFound();
|
||||
|
@ -25,11 +25,11 @@ export async function generateStaticParams() {
|
||||
const Page = async ({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
params: Promise<{
|
||||
slug: string;
|
||||
};
|
||||
}>;
|
||||
}) => {
|
||||
const slug = params.slug;
|
||||
const { slug } = await params;
|
||||
if (!slug) notFound();
|
||||
|
||||
const post = await readSinglePost(slug);
|
||||
|
Reference in New Issue
Block a user