chore: upgrade dependencies

This commit is contained in:
xfy
2025-05-19 14:41:51 +08:00
parent fe51fa33c8
commit 7e9a7b616d
28 changed files with 1611 additions and 1743 deletions

View File

@ -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();

View File

@ -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">

View File

@ -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>

View File

@ -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();

View File

@ -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);