-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppDefault.tsx
33 lines (31 loc) · 1.02 KB
/
AppDefault.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
'use client';
import { AppRoutes } from './AppRoutes.js';
import {
AppContainer,
AppExpandedContainer,
FlexContainer,
} from './components/AppContainer.js';
import { Header } from './components/Header/Header.js';
import { Initializer } from './components/Initializer.js';
import { RoutesExpanded } from './components/Routes/RoutesExpanded.js';
import { useWideVariant } from './hooks/useWideVariant.js';
import { useWidgetConfig } from './providers/WidgetProvider/WidgetProvider.js';
import { ElementId, createElementId } from './utils/elements.js';
export const AppDefault = () => {
const { elementId } = useWidgetConfig();
const wideVariant = useWideVariant();
return (
<AppExpandedContainer
id={createElementId(ElementId.AppExpandedContainer, elementId)}
>
<AppContainer>
<Header />
<FlexContainer disableGutters>
<AppRoutes />
</FlexContainer>
<Initializer />
</AppContainer>
{wideVariant ? <RoutesExpanded /> : null}
</AppExpandedContainer>
);
};