diff --git a/pos-frontend/app/inventory/page.tsx b/pos-frontend/app/inventory/page.tsx index 7cf6acd..1388bf9 100644 --- a/pos-frontend/app/inventory/page.tsx +++ b/pos-frontend/app/inventory/page.tsx @@ -1,5 +1,7 @@ +"use client" + import React, { useState } from 'react' -import { Container, Paper, Col, Table, Button, TextInput, useMantineTheme } from '@mantine/core' +import { Container, Paper, Table, Button, TextInput, useMantineTheme, Flex, Image } from '@mantine/core' import Example from './query' interface InventoryItem { @@ -48,8 +50,8 @@ export default function InventoryPage() { return ( <> - - + + @@ -72,7 +74,7 @@ export default function InventoryPage() {
- + setQuantity(event.currentTarget.value)} /> - +
new QueryClient()) + // const [queryClient] = useState(() => new QueryClient()) return ( @@ -30,9 +31,11 @@ export default function RootLayout({ {/* can add a theme */} - + {/* */} + {children} - + + {/* */} ) diff --git a/pos-frontend/app/query-provider.tsx b/pos-frontend/app/query-provider.tsx new file mode 100644 index 0000000..2b08754 --- /dev/null +++ b/pos-frontend/app/query-provider.tsx @@ -0,0 +1,13 @@ +// app/providers.jsx +'use client' + +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { useState } from 'react' + +export default function Providers({ children }: any) { + const [queryClient] = useState(() => new QueryClient()) + + return ( + {children} + ) +}