mirror of
https://github.com/tiennm99/exchange-rate-export.git
synced 2026-10-13 18:15:36 +00:00
fix: resolve deployment error with useSearchParams
Wrap layout content in <Suspense> to meet Next.js requirements Co-authored-by: Tien Nguyen Minh <39063457+tiennm99@users.noreply.github.com>
This commit is contained in:
1 parent
aef87492bf
commit
9d14c7b525
4 files changed
+1139
-9
No files matched your search
+14
-6
@@ -1,10 +1,13 @@
|
||||
import type { Metadata } from 'next'
|
||||
import './globals.css'
|
||||
import type React from "react"
|
||||
import type { Metadata } from "next"
|
||||
import "./globals.css"
|
||||
import { Analytics } from "@vercel/analytics/next"
|
||||
import { Suspense } from "react"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'v0 App',
|
||||
description: 'Created with v0',
|
||||
generator: 'v0.dev',
|
||||
title: "v0 App",
|
||||
description: "Created with v0",
|
||||
generator: "v0.dev",
|
||||
}
|
||||
|
||||
export default function RootLayout({
|
||||
@@ -14,7 +17,12 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>{children}</body>
|
||||
<body>
|
||||
<Suspense fallback={null}>
|
||||
{children}
|
||||
<Analytics />
|
||||
</Suspense>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
+3
-3
@@ -74,12 +74,12 @@ const BANK_CURRENCIES = {
|
||||
// Helper function to get default dates
|
||||
const getDefaultDates = () => {
|
||||
const today = new Date()
|
||||
const lastMonth = new Date()
|
||||
lastMonth.setMonth(lastMonth.getMonth() - 1)
|
||||
const sevenDaysAgo = new Date()
|
||||
sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7)
|
||||
|
||||
return {
|
||||
endDate: today.toISOString().split("T")[0],
|
||||
startDate: lastMonth.toISOString().split("T")[0],
|
||||
startDate: sevenDaysAgo.toISOString().split("T")[0],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
"@radix-ui/react-toggle": "1.1.1",
|
||||
"@radix-ui/react-toggle-group": "1.1.1",
|
||||
"@radix-ui/react-tooltip": "1.1.6",
|
||||
"@remix-run/react": "latest",
|
||||
"@sveltejs/kit": "latest",
|
||||
"@vercel/analytics": "latest",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
@@ -54,9 +57,12 @@
|
||||
"react-resizable-panels": "^2.1.7",
|
||||
"recharts": "2.15.0",
|
||||
"sonner": "^1.7.1",
|
||||
"svelte": "latest",
|
||||
"tailwind-merge": "^2.5.5",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"vaul": "^0.9.6",
|
||||
"vue": "latest",
|
||||
"vue-router": "latest",
|
||||
"xlsx": "latest",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
|
||||
Generated
+1116
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user