mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-13 06:11:55 +00:00
39aa70a717
Introduces a new `ItemDetail` component to display detailed information for an inventory item. Updates the `InventoryList` to include a link directing users to the detail view for each item. Also adds the necessary route for the `ItemDetail` component in the app configuration.
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import { Routes, Route} from 'react-router';
|
|
import Home from './pages/home.tsx';
|
|
import InventoryList from "./features/inventory/InventoryList.tsx";
|
|
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
|
|
import {createTheme, MantineProvider} from '@mantine/core';
|
|
import '@mantine/core/styles.css';
|
|
import ItemDetail from "./features/inventory/ItemDetail.tsx";
|
|
|
|
// Create a client
|
|
const queryClient = new QueryClient()
|
|
|
|
const barkTheme = createTheme({
|
|
primaryColor: 'red',
|
|
colors: {
|
|
'red': [
|
|
"#ffe8e8",
|
|
"#ffcfd0",
|
|
"#fd9d9d",
|
|
"#fb6868",
|
|
"#fa3c3b",
|
|
"#f9211e",
|
|
"#fa120f",
|
|
"#df0404",
|
|
"#c70002",
|
|
"#ae0000"
|
|
],
|
|
},
|
|
|
|
});
|
|
|
|
function App() {
|
|
return <MantineProvider defaultColorScheme="auto" theme={barkTheme}>{ (
|
|
<QueryClientProvider client={queryClient}>
|
|
<>
|
|
<Routes>
|
|
<Route index element={<Home />} />
|
|
<Route path="inventory" element={<InventoryList />} />
|
|
<Route path="itemDetail/:itemId" element={<ItemDetail />} />
|
|
</Routes>
|
|
|
|
|
|
</>
|
|
</QueryClientProvider>
|
|
) }</MantineProvider>;
|
|
}
|
|
|
|
export default App
|