feat(showcase): add PouchDB sample component and storage page
- Implemented PouchSample component for managing POS configurations and item inventories using PouchDB. - Created StoragePage to encapsulate the PouchSample component. - Added UI components page with various UI elements including buttons, forms, and data grids. - Defined Electron type declarations for printing and auto-update functionalities. - Extended event registry with custom application events for printing and stock updates. - Configured Vite for the showcase application with React and Tailwind CSS support. - Updated package.json and pnpm-lock.yaml to include necessary dependencies for the showcase app.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import { useState, Suspense } from 'react';
|
||||
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
|
||||
import { ThemeProvider, DensityType } from '@repo/ui/provider';
|
||||
import { AgGridProvider } from '@repo/ui/components';
|
||||
import { useThemeStore } from './core/stores/theme.store';
|
||||
import ShowcaseLayout from './layouts/ShowcaseLayout';
|
||||
|
||||
// Pages
|
||||
import UiComponentsPage from './pages/ui-components';
|
||||
import FormsPage from './pages/forms';
|
||||
import StoragePage from './pages/storage';
|
||||
import EventsPage from './pages/events';
|
||||
import HardwarePage from './pages/hardware';
|
||||
import RbacPage from './pages/rbac';
|
||||
import AuthPage from './pages/auth';
|
||||
import ShellDemoPage from './pages/shell-demo';
|
||||
import ActionToolsPage from './pages/action-tools';
|
||||
import AgGridPage from './pages/ag-grid';
|
||||
|
||||
export default function App() {
|
||||
const colorScheme = useThemeStore((s) => s.colorScheme);
|
||||
const [density, setDensity] = useState<DensityType>('compact');
|
||||
|
||||
return (
|
||||
<ThemeProvider colorScheme={colorScheme} density={density}>
|
||||
<AgGridProvider bypassLicense>
|
||||
<BrowserRouter>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Routes>
|
||||
<Route path="/" element={<ShowcaseLayout density={density} setDensity={setDensity} />}>
|
||||
<Route index element={<Navigate to="/ui-components" replace />} />
|
||||
<Route path="ui-components" element={<UiComponentsPage />} />
|
||||
<Route path="forms" element={<FormsPage />} />
|
||||
<Route path="storage" element={<StoragePage />} />
|
||||
<Route path="events" element={<EventsPage />} />
|
||||
<Route path="hardware" element={<HardwarePage />} />
|
||||
<Route path="rbac" element={<RbacPage />} />
|
||||
<Route path="auth" element={<AuthPage />} />
|
||||
<Route path="action-tools" element={<ActionToolsPage />} />
|
||||
<Route path="ag-grid" element={<AgGridPage />} />
|
||||
</Route>
|
||||
<Route path="/shell-demo" element={<ShellDemoPage />} />
|
||||
</Routes>
|
||||
</Suspense>
|
||||
</BrowserRouter>
|
||||
</AgGridProvider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user