♻️ refactor: Update dependencies and improve code consistency across multiple files
This commit is contained in:
@@ -65,7 +65,7 @@ function MobileBindDialog({
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger>{children}</DialogTrigger>
|
||||
<DialogTrigger asChild>{children}</DialogTrigger>
|
||||
<DialogContent className='sm:max-w-[425px]'>
|
||||
<DialogHeader>
|
||||
<DialogTitle>{t('bindMobile')}</DialogTitle>
|
||||
|
||||
@@ -61,7 +61,7 @@ export default function Page() {
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
<ProList<API.UserBalanceLog, Record<string, unknown>>
|
||||
<ProList<API.BalanceLog, Record<string, unknown>>
|
||||
action={ref}
|
||||
request={async (pagination, filter) => {
|
||||
const response = await queryUserBalanceLog({ ...pagination, ...filter });
|
||||
@@ -77,7 +77,7 @@ export default function Page() {
|
||||
<ul className='grid grid-cols-2 gap-3 *:flex *:flex-col lg:grid-cols-4'>
|
||||
<li className='font-semibold'>
|
||||
<span className='text-muted-foreground'>{t('createdAt')}</span>
|
||||
<time>{formatDate(item.created_at)}</time>
|
||||
<time>{formatDate(item.timestamp)}</time>
|
||||
</li>
|
||||
<li className='font-semibold'>
|
||||
<span className='text-muted-foreground'>{t('type.0')}</span>
|
||||
|
||||
@@ -86,7 +86,7 @@ export default function Content({ subscription }: { subscription?: API.Subscribe
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
}, [params, router, subscription?.id]);
|
||||
}, [params, router]);
|
||||
|
||||
if (!subscription) {
|
||||
return <div className='p-6 text-center'>{t('subscriptionNotFound')}</div>;
|
||||
|
||||
@@ -27,6 +27,7 @@ export default function Certification({ platform, children }: CertificationProps
|
||||
.catch((error) => {
|
||||
router.replace('/auth');
|
||||
});
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [pathname]);
|
||||
|
||||
return children;
|
||||
|
||||
@@ -8,20 +8,20 @@ import { NextIntlClientProvider } from 'next-intl';
|
||||
import { getLocale, getMessages } from 'next-intl/server';
|
||||
import { PublicEnvScript } from 'next-runtime-env';
|
||||
import { unstable_noStore as noStore } from 'next/cache';
|
||||
// import { Geist, Geist_Mono } from 'next/font/google';
|
||||
// import { Geist, Geist_Mono } from "next/font/google";
|
||||
import { cookies } from 'next/headers';
|
||||
import { Metadata, Viewport } from 'next/types';
|
||||
import NextTopLoader from 'nextjs-toploader';
|
||||
import React from 'react';
|
||||
|
||||
// const fontSans = Geist({
|
||||
// subsets: ['latin'],
|
||||
// variable: '--font-sans',
|
||||
// const geistSans = Geist({
|
||||
// variable: "--font-geist-sans",
|
||||
// subsets: ["latin"],
|
||||
// });
|
||||
|
||||
// const fontMono = Geist_Mono({
|
||||
// subsets: ['latin'],
|
||||
// variable: '--font-mono',
|
||||
// const geistMono = Geist_Mono({
|
||||
// variable: "--font-geist-mono",
|
||||
// subsets: ["latin"],
|
||||
// });
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
@@ -106,7 +106,7 @@ export default async function RootLayout({
|
||||
</head>
|
||||
<body
|
||||
suppressHydrationWarning
|
||||
// ${fontSans.variable} ${fontMono.variable}
|
||||
// ${geistSans.variable} ${geistMono.variable}
|
||||
className={`size-full min-h-[calc(100dvh-env(safe-area-inset-top))] font-sans antialiased`}
|
||||
>
|
||||
<NextIntlClientProvider messages={messages}>
|
||||
|
||||
@@ -32,6 +32,7 @@ export default function Certification({ platform, children }: CertificationProps
|
||||
.catch((error) => {
|
||||
router.replace('/auth');
|
||||
});
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [pathname]);
|
||||
|
||||
return children;
|
||||
|
||||
Reference in New Issue
Block a user