chore: upgrade swr and so on

This commit is contained in:
Joel 2025-02-11 15:41:31 +08:00
parent dcfadbd315
commit 6653b6e072
6 changed files with 16 additions and 11 deletions

View File

@ -1,12 +1,17 @@
import Main from './layout-main'
const DatasetDetailLayout = async ({
children,
params,
}: {
children: React.ReactNode
params: Promise<{ datasetId: string }>
}) => {
const DatasetDetailLayout = async (
props: {
children: React.ReactNode
params: Promise<{ datasetId: string }>
}
) => {
const params = await props.params;
const {
children
} = props;
return <Main params={(await params)}>{children}</Main>
}
export default DatasetDetailLayout

View File

@ -115,7 +115,6 @@ export const PortalToFollowElemTrigger = (
) => {
const context = usePortalToFollowElemContext()
const childrenRef = (children as any).props?.ref
console.log(childrenRef)
const ref = useMergeRefs([context.refs.setReference, propRef, childrenRef])
// `asChild` allows the user to pass any element as the anchor

View File

@ -20,6 +20,7 @@ const Billing: FC = () => {
(!enableBilling || !isCurrentWorkspaceManager) ? null : ['/billing/invoices'],
() => fetchBillingUrl().then(data => data.url),
)
console.log(billingUrl)
return (
<div>

View File

@ -41,7 +41,7 @@ export const getLocaleOnServer = async (): Promise<Locale> => {
if (!languages.length) {
// Negotiator expects plain object so we need to transform headers
const negotiatorHeaders: Record<string, string> = {}
headers().forEach((value, key) => (negotiatorHeaders[key] = value))
(await headers()).forEach((value, key) => (negotiatorHeaders[key] = value))
// Use negotiator and intl-localematcher to get best locale
languages = new Negotiator({ headers: negotiatorHeaders }).languages()
}

View File

@ -114,7 +114,7 @@
"sharp": "^0.33.2",
"shave": "^5.0.4",
"sortablejs": "^1.15.0",
"swr": "^2.1.0",
"swr": "^2.3.0",
"tailwind-merge": "^2.5.4",
"use-context-selector": "^2.0.0",
"uuid": "^10.0.0",

View File

@ -284,7 +284,7 @@ importers:
specifier: ^1.15.0
version: 1.15.6
swr:
specifier: ^2.1.0
specifier: ^2.3.0
version: 2.3.2(react@19.0.0)
tailwind-merge:
specifier: ^2.5.4