♻️ refactor: Update dependencies and improve code consistency across multiple files

This commit is contained in:
web
2025-08-27 08:03:03 -07:00
parent 973c06f0fa
commit e37ae49960
13 changed files with 63 additions and 61 deletions
@@ -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>
+2 -2
View File
@@ -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>
+1 -1
View File
@@ -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 -8
View File
@@ -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;
+1 -1
View File
@@ -8,7 +8,7 @@ interface SubscribeBillingProps {
order?: Partial<
API.OrderDetail & {
unit_price: number;
unit_time: number;
unit_time: string;
subscribe_discount: number;
}
>;
+22 -22
View File
@@ -10,41 +10,41 @@
"start": "next start"
},
"dependencies": {
"@stripe/react-stripe-js": "^3.4.0",
"@stripe/stripe-js": "^6.0.0",
"@tanstack/react-query": "^5.63.0",
"@tanstack/react-query-next-experimental": "^5.63.0",
"@stripe/react-stripe-js": "^3.9.2",
"@stripe/stripe-js": "^7.9.0",
"@tanstack/react-query": "^5.85.5",
"@tanstack/react-query-next-experimental": "^5.85.5",
"@workspace/ui": "workspace:*",
"ahooks": "^3.8.4",
"axios": "^1.7.9",
"framer-motion": "^11.16.1",
"ahooks": "^3.9.4",
"axios": "^1.11.0",
"framer-motion": "^12.23.12",
"gray-matter": "^4.0.3",
"lucide-react": "^0.469.0",
"next": "^15.1.4",
"lucide-react": "^0.542.0",
"next": "^15.5.2",
"next-intl": "^3.26.3",
"next-runtime-env": "^3.2.2",
"next-themes": "^0.4.4",
"nextjs-toploader": "^3.7.15",
"next-runtime-env": "^3.3.0",
"next-themes": "^0.4.6",
"nextjs-toploader": "^3.8.16",
"qrcode.react": "^4.2.0",
"radash": "^12.1.0",
"react": "^19.0.0",
"radash": "^12.1.1",
"react": "^19.1.1",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^19.0.0",
"react-dom": "^19.1.1",
"react-turnstile": "^1.1.4",
"rtl-detect": "^1.1.2",
"ua-parser-js": "^2.0.0",
"universal-cookie": "^7.2.2",
"zustand": "^5.0.3"
"ua-parser-js": "^2.0.4",
"universal-cookie": "^8.0.1",
"zustand": "^5.0.8"
},
"devDependencies": {
"@types/node": "^22.10.5",
"@types/react": "^19.0.4",
"@types/node": "^24.3.0",
"@types/react": "^19.1.11",
"@types/react-copy-to-clipboard": "^5.0.7",
"@types/react-dom": "^19.0.2",
"@types/react-dom": "^19.1.8",
"@types/rtl-detect": "^1.0.3",
"@workspace/eslint-config": "workspace:*",
"@workspace/typescript-config": "workspace:*",
"typescript": "^5.7.3"
"typescript": "^5.9.2"
},
"i18n": {
"entry": "./locales/en-US",