Download frontend/app/components/ClientWrapper.tsx from nivakaran/modelx: direct link, hf CLI and curl.
- Browser
- Download file 762 Bytes
-
https://huggingface.co/spaces/nivakaran/modelx/resolve/main/frontend/app/components/ClientWrapper.tsx
- Command line
-
hf download hf://spaces/nivakaran/modelx/frontend/app/components/ClientWrapper.tsx
-
curl -L -o ClientWrapper.tsx https://huggingface.co/spaces/nivakaran/modelx/resolve/main/frontend/app/components/ClientWrapper.tsx
762 Bytes
| 'use client' | |
| import { ReactNode, useState } from 'react'; | |
| import { Toaster } from "./ui/toaster"; | |
| import { Toaster as Sonner } from "./ui/sonner"; | |
| import { TooltipProvider } from "./ui/tooltip"; | |
| import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | |
| import { BrowserRouter } from "react-router-dom"; | |
| interface ClientWrapperProps { | |
| children: ReactNode; | |
| } | |
| export default function ClientWrapper({ children }: ClientWrapperProps) { | |
| const [queryClient] = useState(() => new QueryClient()); | |
| return ( | |
| <QueryClientProvider client={queryClient}> | |
| <TooltipProvider> | |
| <Toaster /> | |
| <Sonner /> | |
| <BrowserRouter> | |
| {children} | |
| </BrowserRouter> | |
| </TooltipProvider> | |
| </QueryClientProvider> | |
| ); | |
| } | |