Added custom empty placeholder.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
This commit is contained in:
parent
b1590c7adc
commit
edf5ffc244
118
src/App.jsx
118
src/App.jsx
@ -17,6 +17,7 @@ import {
|
|||||||
ElectronSpotlightContentPage
|
ElectronSpotlightContentPage
|
||||||
} from './components/Dashboard/context/SpotlightContext.jsx'
|
} from './components/Dashboard/context/SpotlightContext.jsx'
|
||||||
import { ActionsModalProvider } from './components/Dashboard/context/ActionsModalContext.jsx'
|
import { ActionsModalProvider } from './components/Dashboard/context/ActionsModalContext.jsx'
|
||||||
|
import MissingPlaceholder from './components/Dashboard/common/MissingPlaceholder.jsx'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ThemeProvider,
|
ThemeProvider,
|
||||||
@ -54,7 +55,14 @@ const AppContent = () => {
|
|||||||
const Router = getRouter()
|
const Router = getRouter()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ConfigProvider theme={themeConfig}>
|
<ConfigProvider
|
||||||
|
theme={themeConfig}
|
||||||
|
renderEmpty={() => (
|
||||||
|
<div style={{ margin: '32px' }}>
|
||||||
|
<MissingPlaceholder message='No data.' hasBackground={false} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
>
|
||||||
<App>
|
<App>
|
||||||
<Router>
|
<Router>
|
||||||
<ElectronProvider>
|
<ElectronProvider>
|
||||||
@ -65,60 +73,60 @@ const AppContent = () => {
|
|||||||
<NotificationProvider>
|
<NotificationProvider>
|
||||||
<SpotlightProvider>
|
<SpotlightProvider>
|
||||||
<ActionsModalProvider>
|
<ActionsModalProvider>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route
|
<Route
|
||||||
path='/dashboard/electron/spotlightcontent'
|
path='/dashboard/electron/spotlightcontent'
|
||||||
element={
|
element={
|
||||||
<PrivateRoute
|
<PrivateRoute
|
||||||
component={() => (
|
component={() => (
|
||||||
<ElectronSpotlightContentPage />
|
<ElectronSpotlightContentPage />
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path='/'
|
path='/'
|
||||||
element={
|
element={
|
||||||
<PrivateRoute
|
<PrivateRoute
|
||||||
component={() => (
|
component={() => (
|
||||||
<Navigate
|
<Navigate
|
||||||
to='/dashboard/production/overview'
|
to='/dashboard/production/overview'
|
||||||
replace
|
replace
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path='/auth/callback'
|
path='/auth/callback'
|
||||||
element={<AuthCallback />}
|
element={<AuthCallback />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path='/email/notification'
|
path='/email/notification'
|
||||||
element={<EmailNotificationTemplate />}
|
element={<EmailNotificationTemplate />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path='/dashboard'
|
path='/dashboard'
|
||||||
element={
|
element={
|
||||||
<PrivateRoute component={() => <Dashboard />} />
|
<PrivateRoute component={() => <Dashboard />} />
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{ProductionRoutes}
|
{ProductionRoutes}
|
||||||
{InventoryRoutes}
|
{InventoryRoutes}
|
||||||
{FinanceRoutes}
|
{FinanceRoutes}
|
||||||
{SalesRoutes}
|
{SalesRoutes}
|
||||||
{ManagementRoutes}
|
{ManagementRoutes}
|
||||||
{DeveloperRoutes}
|
{DeveloperRoutes}
|
||||||
</Route>
|
</Route>
|
||||||
<Route
|
<Route
|
||||||
path='*'
|
path='*'
|
||||||
element={
|
element={
|
||||||
<AppError
|
<AppError
|
||||||
message='Error 404. Page not found.'
|
message='Error 404. Page not found.'
|
||||||
showRefresh={false}
|
showRefresh={false}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Routes>
|
</Routes>
|
||||||
</ActionsModalProvider>
|
</ActionsModalProvider>
|
||||||
</SpotlightProvider>
|
</SpotlightProvider>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user