Portal/rsconcept/frontend/src/app/GlobalProviders.tsx

21 lines
556 B
TypeScript
Raw Normal View History

2024-06-07 20:17:03 +03:00
'use client';
2025-02-12 21:36:03 +03:00
import { IntlProvider } from 'react-intl';
2025-01-21 12:00:09 +03:00
import { QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
2024-06-07 20:17:03 +03:00
2025-01-21 12:00:09 +03:00
import { queryClient } from '@/backend/queryClient';
2024-06-07 20:17:03 +03:00
// prettier-ignore
2025-02-19 23:29:45 +03:00
export function GlobalProviders({ children }: React.PropsWithChildren) {
2024-06-07 20:17:03 +03:00
return (
<IntlProvider locale='ru' defaultLocale='ru'>
2025-01-21 12:00:09 +03:00
<QueryClientProvider client={queryClient}>
2025-01-21 12:00:09 +03:00
<ReactQueryDevtools initialIsOpen={false} />
2024-06-07 20:17:03 +03:00
{children}
2025-01-21 12:00:09 +03:00
</QueryClientProvider>
</IntlProvider>);
2024-06-07 20:17:03 +03:00
}