mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-13 06:11:55 +00:00
571914ac0f
Adjusted routes and links throughout the inventory feature to include the 'inventory' prefix for improved path clarity and consistency. This change ensures better organization and aligns with routing standards across the application."
56 lines
1.8 KiB
TypeScript
56 lines
1.8 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";
|
|
import EditItem from "./features/inventory/EditItem.tsx";
|
|
import {BarkHeader} from "./common/components/BarkHeader.tsx";
|
|
import AddItem from "./features/inventory/AddItem.tsx";
|
|
import { Notifications } from '@mantine/notifications';
|
|
import '@mantine/notifications/styles.css';
|
|
|
|
// 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}>
|
|
<>
|
|
|
|
<BarkHeader></BarkHeader>
|
|
<Notifications />
|
|
<Routes>
|
|
<Route index element={<Home/>}/>
|
|
<Route path="inventory" element={<InventoryList/>}/>
|
|
<Route path="inventory/itemDetail/:itemId" element={<ItemDetail/>}/>
|
|
<Route path="inventory/editItem/:itemId" element={<EditItem/>}/>
|
|
<Route path="inventory/addItem" element={<AddItem/>}/>
|
|
</Routes>
|
|
</>
|
|
</QueryClientProvider>
|
|
)}</MantineProvider>;
|
|
}
|
|
|
|
export default App
|