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:
François Best
2024-10-23 19:57:38 +02:00
committed by GitHub
parent 4fe338c628
commit e7d135dddb
10 changed files with 32 additions and 20 deletions

View File

@@ -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>