Skip to content

Commit

Permalink
➕ install and setup react query
Browse files Browse the repository at this point in the history
  • Loading branch information
seimori committed Nov 10, 2024
1 parent 11c18a8 commit 4c88107
Show file tree
Hide file tree
Showing 4 changed files with 247 additions and 205 deletions.
9 changes: 6 additions & 3 deletions apps/web/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Footer } from "../components/layout/Footer/Footer";
import { Header } from "../components/layout/Header/Header";
import { MainContent } from "../components/layout/MainContent/MainContent";
import Providers from "../components/utils/Providers";
import "./globals.css";

export default function RootLayout({
Expand All @@ -11,9 +12,11 @@ export default function RootLayout({
return (
<html lang="en">
<body>
<Header />
<MainContent>{children}</MainContent>
<Footer>Voir le classement des chats</Footer>
<Providers>
<Header />
<MainContent>{children}</MainContent>
<Footer>Voir le classement des chats</Footer>
</Providers>
</body>
</html>
);
Expand Down
11 changes: 11 additions & 0 deletions apps/web/components/utils/Providers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"use client";

import { QueryClient, QueryClientProvider } from "@tanstack/react-query";

const queryClient = new QueryClient();

export default function Providers({ children }: { children: React.ReactNode }) {
return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
}
3 changes: 2 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
"dependencies": {
"@repo/ui": "*",
"next": "14.2.6",
"@tanstack/react-query": "^5.59.20",
"next": "^14.2.17",
"react": "18.3.1",
"react-dom": "18.3.1"
},
Expand Down
Loading

0 comments on commit 4c88107

Please sign in to comment.