♻️ refactor: Update dependencies and improve code consistency across multiple files
This commit is contained in:
parent
973c06f0fa
commit
e37ae49960
@ -93,7 +93,7 @@ export default function PaymentTable() {
|
||||
{
|
||||
accessorKey: 'platform',
|
||||
header: t('platform'),
|
||||
cell: ({ row }) => <Badge>{t(row.getValue('platform'))}</Badge>,
|
||||
cell: ({ row }) => <Badge>{t(row.original.platform)}</Badge>,
|
||||
},
|
||||
{
|
||||
accessorKey: 'notify_url',
|
||||
|
||||
@ -10,35 +10,35 @@
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lottiefiles/dotlottie-react": "^0.12.1",
|
||||
"@tanstack/react-query": "^5.63.0",
|
||||
"@tanstack/react-query-next-experimental": "^5.63.0",
|
||||
"@lottiefiles/dotlottie-react": "^0.15.1",
|
||||
"@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",
|
||||
"ahooks": "^3.9.4",
|
||||
"axios": "^1.11.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"nanoid": "^5.0.9",
|
||||
"next": "^15.1.4",
|
||||
"nanoid": "^5.1.5",
|
||||
"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",
|
||||
"radash": "^12.1.0",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"next-runtime-env": "^3.3.0",
|
||||
"next-themes": "^0.4.6",
|
||||
"nextjs-toploader": "^3.8.16",
|
||||
"radash": "^12.1.1",
|
||||
"react": "^19.1.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"react-turnstile": "^1.1.4",
|
||||
"universal-cookie": "^7.2.2",
|
||||
"zustand": "^5.0.3"
|
||||
"universal-cookie": "^8.0.1",
|
||||
"zustand": "^5.0.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^22.10.5",
|
||||
"@types/react": "^19.0.4",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"@types/node": "^24.3.0",
|
||||
"@types/react": "^19.1.11",
|
||||
"@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",
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -8,7 +8,7 @@ interface SubscribeBillingProps {
|
||||
order?: Partial<
|
||||
API.OrderDetail & {
|
||||
unit_price: number;
|
||||
unit_time: number;
|
||||
unit_time: string;
|
||||
subscribe_discount: number;
|
||||
}
|
||||
>;
|
||||
|
||||
@ -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",
|
||||
|
||||
10
package.json
10
package.json
@ -48,18 +48,18 @@
|
||||
},
|
||||
"prettier": "@workspace/prettier-config",
|
||||
"devDependencies": {
|
||||
"@netlify/plugin-nextjs": "^5.11.6",
|
||||
"@umijs/openapi": "^1.13.0",
|
||||
"@netlify/plugin-nextjs": "^5.12.1",
|
||||
"@umijs/openapi": "^1.13.15",
|
||||
"@workspace/commitlint-config": "workspace:*",
|
||||
"@workspace/eslint-config": "workspace:*",
|
||||
"@workspace/prettier-config": "workspace:*",
|
||||
"@workspace/typescript-config": "workspace:*",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.3.0",
|
||||
"lint-staged": "^16.1.5",
|
||||
"semantic-release": "21.1.2",
|
||||
"semantic-release-config-gitmoji": "^1.5.3",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "^5.7.3"
|
||||
"turbo": "^2.5.6",
|
||||
"typescript": "^5.9.2"
|
||||
},
|
||||
"packageManager": "bun@1.1.43",
|
||||
"engines": {
|
||||
|
||||
@ -30,7 +30,7 @@ import { ColumnToggle } from '@workspace/ui/custom-components/pro-table/column-t
|
||||
import { Pagination } from '@workspace/ui/custom-components/pro-table/pagination';
|
||||
import { SortableRow } from '@workspace/ui/custom-components/pro-table/sortable-row';
|
||||
import { ProTableWrapper } from '@workspace/ui/custom-components/pro-table/wrapper';
|
||||
import { cn } from '@workspace/ui/lib/utils.js';
|
||||
import { cn } from '@workspace/ui/lib/utils';
|
||||
import { useSize } from 'ahooks';
|
||||
import { GripVertical, ListRestart, Loader, RefreshCcw } from 'lucide-react';
|
||||
import React, { Fragment, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user