chore(dashboard): Update nuqs to v2 (#80)
* chore: Update nuqs to v2 * chore: Remove `clearOnDefault: true` (now the default) * chore: Import from nuqs/server in server-side code. Those imports don't contain the "use client" directive which may cause issues on function-based parsers. * chore: Update to nuqs@2.0.2 This actually sets clearOnDefault: true by default, which was omitted from the v2 release.
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
"next-auth": "^4.24.5",
|
||||
"next-themes": "^0.2.1",
|
||||
"nextjs-toploader": "^1.6.11",
|
||||
"nuqs": "^1.16.1",
|
||||
"nuqs": "^2.0.2",
|
||||
"prisma-error-enum": "^0.1.3",
|
||||
"pushmodal": "^1.0.3",
|
||||
"ramda": "^0.29.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { PageTabs, PageTabsLink } from '@/components/page-tabs';
|
||||
import { Padding } from '@/components/ui/padding';
|
||||
import { parseAsStringEnum } from 'nuqs';
|
||||
import { parseAsStringEnum } from 'nuqs/server';
|
||||
|
||||
import Charts from './charts';
|
||||
import Conversions from './conversions';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { PageTabs, PageTabsLink } from '@/components/page-tabs';
|
||||
import { Padding } from '@/components/ui/padding';
|
||||
import { parseAsStringEnum } from 'nuqs';
|
||||
import { parseAsStringEnum } from 'nuqs/server';
|
||||
|
||||
import { Pages } from './pages';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { PageTabs, PageTabsLink } from '@/components/page-tabs';
|
||||
import { Padding } from '@/components/ui/padding';
|
||||
import { parseAsStringEnum } from 'nuqs';
|
||||
import { parseAsStringEnum } from 'nuqs/server';
|
||||
|
||||
import PowerUsers from './power-users';
|
||||
import Profiles from './profiles';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ActiveIntegrations } from '@/components/integrations/active-integration
|
||||
import { AllIntegrations } from '@/components/integrations/all-integrations';
|
||||
import { PageTabs, PageTabsLink } from '@/components/page-tabs';
|
||||
import { Padding } from '@/components/ui/padding';
|
||||
import { parseAsStringEnum } from 'nuqs';
|
||||
import { parseAsStringEnum } from 'nuqs/server';
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { NotificationRules } from '@/components/notifications/notification-rules
|
||||
import { Notifications } from '@/components/notifications/notifications';
|
||||
import { PageTabs, PageTabsLink } from '@/components/page-tabs';
|
||||
import { Padding } from '@/components/ui/padding';
|
||||
import { parseAsStringEnum } from 'nuqs';
|
||||
import { parseAsStringEnum } from 'nuqs/server';
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import PageLayout from '@/app/(app)/[organizationSlug]/[projectId]/page-layout';
|
||||
import { FullPageEmptyState } from '@/components/full-page-empty-state';
|
||||
import { PageTabs, PageTabsLink } from '@/components/page-tabs';
|
||||
import { Padding } from '@/components/ui/padding';
|
||||
import { auth } from '@clerk/nextjs/server';
|
||||
import { ShieldAlertIcon } from 'lucide-react';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { parseAsStringEnum } from 'nuqs';
|
||||
import { parseAsStringEnum } from 'nuqs/server';
|
||||
|
||||
import { db } from '@openpanel/db';
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ClerkProvider, useAuth } from '@clerk/nextjs';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { httpLink } from '@trpc/client';
|
||||
import { ThemeProvider } from 'next-themes';
|
||||
import { NuqsAdapter } from 'nuqs/adapters/next/app';
|
||||
import type React from 'react';
|
||||
import { useRef, useState } from 'react';
|
||||
import { Provider as ReduxProvider } from 'react-redux';
|
||||
@@ -75,12 +76,14 @@ function AllProviders({ children }: { children: React.ReactNode }) {
|
||||
<ReduxProvider store={storeRef.current}>
|
||||
<api.Provider client={trpcClient} queryClient={queryClient}>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<TooltipProvider delayDuration={200}>
|
||||
{children}
|
||||
<NotificationProvider />
|
||||
<Toaster />
|
||||
<ModalProvider />
|
||||
</TooltipProvider>
|
||||
<NuqsAdapter>
|
||||
<TooltipProvider delayDuration={200}>
|
||||
{children}
|
||||
<NotificationProvider />
|
||||
<Toaster />
|
||||
<ModalProvider />
|
||||
</TooltipProvider>
|
||||
</NuqsAdapter>
|
||||
</QueryClientProvider>
|
||||
</api.Provider>
|
||||
</ReduxProvider>
|
||||
|
||||
@@ -20,7 +20,6 @@ export const useFullscreen = () =>
|
||||
'fullscreen',
|
||||
parseAsBoolean.withDefault(false).withOptions({
|
||||
history: 'push',
|
||||
clearOnDefault: true,
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
21
pnpm-lock.yaml
generated
21
pnpm-lock.yaml
generated
@@ -362,8 +362,8 @@ importers:
|
||||
specifier: ^1.6.11
|
||||
version: 1.6.11(next@14.2.1)(react-dom@18.2.0)(react@18.2.0)
|
||||
nuqs:
|
||||
specifier: ^1.16.1
|
||||
version: 1.17.0(next@14.2.1)
|
||||
specifier: ^2.0.2
|
||||
version: 2.0.2(next@14.2.1)(react@18.2.0)
|
||||
prisma-error-enum:
|
||||
specifier: ^0.1.3
|
||||
version: 0.1.3
|
||||
@@ -16122,13 +16122,24 @@ packages:
|
||||
resolution: {integrity: sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==}
|
||||
dev: false
|
||||
|
||||
/nuqs@1.17.0(next@14.2.1):
|
||||
resolution: {integrity: sha512-Lp2qLETMb7AAYhDtRtx20oAZNkYYTPApZcaX7Q5nQz7bfy893TCIe92IYVIfl9ZUqQLTsl9855KGEsA57dylPQ==}
|
||||
/nuqs@2.0.2(next@14.2.1)(react@18.2.0):
|
||||
resolution: {integrity: sha512-m9o8avj1CI6ryO0jhjFi8dhFA8jLXb+6esZbkki8tJixBnexPFoVZ5wFgmANVumbyeLemZ/ujhYn23iERRYwlA==}
|
||||
peerDependencies:
|
||||
next: '>=13.4 <14.0.2 || ^14.0.3'
|
||||
'@remix-run/react': '>= 2'
|
||||
next: '>= 14.2.0'
|
||||
react: '>= 18.2.0'
|
||||
react-router-dom: '>= 6'
|
||||
peerDependenciesMeta:
|
||||
'@remix-run/react':
|
||||
optional: true
|
||||
next:
|
||||
optional: true
|
||||
react-router-dom:
|
||||
optional: true
|
||||
dependencies:
|
||||
mitt: 3.0.1
|
||||
next: 14.2.1(@opentelemetry/api@1.8.0)(react-dom@18.2.0)(react@18.2.0)
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
/oauth@0.9.15:
|
||||
|
||||
Reference in New Issue
Block a user