mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Start using react-zen.
This commit is contained in:
parent
020cfdc646
commit
71e4f8f49b
24 changed files with 1872 additions and 609 deletions
|
|
@ -1,11 +1,13 @@
|
|||
'use client';
|
||||
import { IntlProvider } from 'react-intl';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { ReactBasicsProvider } from 'react-basics';
|
||||
import { ZenProvider } from '@umami/react-zen';
|
||||
import ErrorBoundary from '@/components/common/ErrorBoundary';
|
||||
import { useLocale } from '@/components/hooks';
|
||||
import 'chartjs-adapter-date-fns';
|
||||
import { useEffect } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { RouterProvider } from 'react-aria-components';
|
||||
|
||||
const client = new QueryClient({
|
||||
defaultOptions: {
|
||||
|
|
@ -32,14 +34,18 @@ function MessagesProvider({ children }) {
|
|||
}
|
||||
|
||||
export function Providers({ children }) {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<MessagesProvider>
|
||||
<QueryClientProvider client={client}>
|
||||
<ReactBasicsProvider>
|
||||
<ErrorBoundary>{children}</ErrorBoundary>
|
||||
</ReactBasicsProvider>
|
||||
</QueryClientProvider>
|
||||
</MessagesProvider>
|
||||
<ZenProvider>
|
||||
<RouterProvider navigate={router.push}>
|
||||
<MessagesProvider>
|
||||
<QueryClientProvider client={client}>
|
||||
<ErrorBoundary>{children}</ErrorBoundary>
|
||||
</QueryClientProvider>
|
||||
</MessagesProvider>
|
||||
</RouterProvider>
|
||||
</ZenProvider>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue