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

23 lines
582 B
TypeScript
Raw Normal View History

2024-06-07 20:17:03 +03:00
'use client';
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
import { IntlProvider } from 'react-intl';
2025-01-21 12:00:09 +03:00
import { queryClient } from '@/backend/queryClient';
2024-06-07 20:17:03 +03:00
// prettier-ignore
2024-09-19 17:48:48 +03:00
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
}
export default GlobalProviders;