@campxdev/shared 0.5.21 → 0.5.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +4 -0
- package/.eslintrc.js +34 -0
- package/.prettierrc +10 -0
- package/exports.ts +7 -6
- package/package.json +64 -50
- package/publish.sh +2 -0
- package/src/assets/images/index.ts +8 -8
- package/src/components/Breadcrumbs.tsx +3 -3
- package/src/components/ChangePassword.tsx +147 -147
- package/src/components/DropDownButton.tsx +167 -163
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +22 -22
- package/src/components/ErrorBoundary/ErrorFallback.tsx +215 -215
- package/src/components/ErrorBoundary/GlobalNetworkLoadingIndicator.tsx +6 -6
- package/src/components/ErrorBoundary/index.tsx +1 -1
- package/src/components/FullScreenLoader.tsx +15 -15
- package/src/components/HookForm/AutoCompleteSearch.tsx +0 -30
- package/src/components/HookForm/RadioGroup.tsx +1 -1
- package/src/components/IconButtons/Icons.tsx +1 -2
- package/src/components/Input/AutoCompleteSearch.tsx +0 -30
- package/src/components/Input/SingleSelect.tsx +0 -15
- package/src/components/Layout/Header/AppHeader.tsx +89 -89
- package/src/components/Layout/Header/AppsMenu.tsx +79 -79
- package/src/components/Layout/Header/CogWheelMenu.tsx +27 -27
- package/src/components/Layout/Header/UserBox.tsx +25 -25
- package/src/components/Layout/Header/applications.ts +79 -79
- package/src/components/Layout/Header/assets/index.ts +10 -10
- package/src/components/Layout/Header/styles.tsx +72 -72
- package/src/components/LayoutWrapper.tsx +6 -6
- package/src/components/LinearProgress.tsx +14 -14
- package/src/components/ListItemButton.tsx +79 -79
- package/src/components/LoginForm.tsx +86 -86
- package/src/components/MenuButton.tsx +88 -88
- package/src/components/ModalButtons/DialogButton.tsx +66 -66
- package/src/components/PageContent.tsx +10 -10
- package/src/components/PageNotFound.tsx +12 -12
- package/src/components/PopupConfirm/ConfirmContextProvider.tsx +28 -28
- package/src/components/PopupConfirm/PopupConfirm.tsx +27 -27
- package/src/components/PopupConfirm/useConfirm.ts +41 -41
- package/src/components/SideMenuHeader.tsx +15 -15
- package/src/components/SideNav.tsx +119 -119
- package/src/components/Spinner.tsx +14 -14
- package/src/components/TableComponent/ReactTable.tsx +256 -256
- package/src/components/TableComponent/RenderTableBody.tsx +56 -56
- package/src/components/TableComponent/index.tsx +171 -171
- package/src/components/TableComponent/react-table-config.d.ts +2 -3
- package/src/components/index.ts +54 -54
- package/src/config/axios.ts +50 -50
- package/src/config/axiosXTenant.ts +57 -0
- package/src/constants/isDevelopment.ts +2 -2
- package/src/contexts/LoginFormProvider.tsx +28 -28
- package/src/contexts/Providers.tsx +40 -40
- package/src/contexts/QueryClientProvider.tsx +15 -15
- package/src/hooks/index.ts +2 -2
- package/src/hooks/useAppInit.ts +23 -23
- package/src/hooks/useAuth.ts +78 -77
- package/src/layouts/Components/DashBoardMenu.tsx +77 -77
- package/src/layouts/Components/icons/index.tsx +32 -32
- package/src/layouts/Components/styles.tsx +23 -23
- package/src/permissions/PageWithPermission.tsx +9 -9
- package/src/permissions/PermissionDeniedPage.tsx +13 -13
- package/src/permissions/PermissionsStore.ts +303 -303
- package/src/shared-state/index.ts +3 -3
- package/src/theme/MuiThemeProvider.tsx +9 -9
- package/src/theme/theme.d.ts +72 -72
- package/src/utils/index.ts +7 -7
- package/src/utils/logout.ts +19 -19
- package/src/utils/withLocalization.tsx +8 -8
- package/src/utils/withRouteWrapper.tsx +20 -20
- package/src/utils/withSuspense.tsx +3 -3
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import {Visibility, VisibilityOff} from '@mui/icons-material'
|
|
1
|
+
import { Visibility, VisibilityOff } from '@mui/icons-material'
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
Alert,
|
|
4
|
+
Box,
|
|
5
|
+
Button,
|
|
6
|
+
IconButton,
|
|
7
|
+
InputAdornment,
|
|
8
|
+
Stack,
|
|
9
|
+
styled,
|
|
10
10
|
} from '@mui/material'
|
|
11
11
|
import axiosBase from 'axios'
|
|
12
12
|
import Cookies from 'js-cookie'
|
|
13
|
-
import {useState} from 'react'
|
|
14
|
-
import {useForm} from 'react-hook-form'
|
|
15
|
-
import {FormTextField} from './HookForm'
|
|
13
|
+
import { useState } from 'react'
|
|
14
|
+
import { useForm } from 'react-hook-form'
|
|
15
|
+
import { FormTextField } from './HookForm'
|
|
16
16
|
|
|
17
17
|
const developmentOrigin = window.location.origin + '/campx_dev'
|
|
18
18
|
|
|
19
|
-
export const StyledTextField = styled(FormTextField)(({theme}) => ({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
export const StyledTextField = styled(FormTextField)(({ theme }) => ({
|
|
20
|
+
'& .MuiInputBase-root': {
|
|
21
|
+
minHeight: '60px',
|
|
22
|
+
},
|
|
23
|
+
'& .MuiOutlinedInput-input': {
|
|
24
|
+
padding: '18.5px 14px',
|
|
25
|
+
},
|
|
26
26
|
}))
|
|
27
27
|
|
|
28
|
-
export const StyledButton = styled(Button)(({theme}) => ({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
export const StyledButton = styled(Button)(({ theme }) => ({
|
|
29
|
+
borderRadius: '10px',
|
|
30
|
+
height: '60px',
|
|
31
|
+
fontSize: '18px',
|
|
32
32
|
}))
|
|
33
33
|
|
|
34
34
|
export function LoginForm() {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
const [showPassword, setShowPassword] = useState(false)
|
|
36
|
+
const { handleSubmit, control } = useForm()
|
|
37
|
+
const [error, setError] = useState('')
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
const onSubmit = async (values) => {
|
|
40
|
+
try {
|
|
41
|
+
const res = await axiosBase({
|
|
42
|
+
method: 'POST',
|
|
43
|
+
url: 'https://auth-api.campx.dev/auth/login',
|
|
44
|
+
data: values,
|
|
45
|
+
})
|
|
46
|
+
Cookies.set('campx_session_key', res.data.cookie)
|
|
47
|
+
window.location.href = developmentOrigin
|
|
48
|
+
} catch (err) {
|
|
49
|
+
// eslint-disable-next-line no-console
|
|
50
|
+
console.log(err)
|
|
51
|
+
setError(err.response.data.message ?? 'Server Error')
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
55
|
+
return (
|
|
56
|
+
<Box sx={{ maxWidth: '500px' }} margin="0 auto" padding={'0 1rem'}>
|
|
57
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
|
58
|
+
<Stack gap={'40px'}>
|
|
59
|
+
<Box>
|
|
60
|
+
<StyledTextField
|
|
61
|
+
size="medium"
|
|
62
|
+
control={control}
|
|
63
|
+
name="username"
|
|
64
|
+
label="User ID"
|
|
65
|
+
required
|
|
66
|
+
/>
|
|
67
|
+
</Box>
|
|
68
|
+
<Box>
|
|
69
|
+
<StyledTextField
|
|
70
|
+
control={control}
|
|
71
|
+
name="password"
|
|
72
|
+
label="Password"
|
|
73
|
+
type={showPassword ? 'text' : 'password'}
|
|
74
|
+
required
|
|
75
|
+
InputProps={{
|
|
76
|
+
endAdornment: (
|
|
77
|
+
<InputAdornment position="end">
|
|
78
|
+
<IconButton
|
|
79
|
+
size="small"
|
|
80
|
+
aria-label="toggle password visibility"
|
|
81
|
+
onClick={() => setShowPassword((prev) => !prev)}
|
|
82
|
+
edge="end"
|
|
83
|
+
>
|
|
84
|
+
{showPassword ? <VisibilityOff /> : <Visibility />}
|
|
85
|
+
</IconButton>
|
|
86
|
+
</InputAdornment>
|
|
87
|
+
),
|
|
88
|
+
}}
|
|
89
|
+
/>
|
|
90
|
+
</Box>
|
|
91
|
+
<StyledButton type="submit">Login</StyledButton>
|
|
92
|
+
</Stack>
|
|
93
|
+
</form>
|
|
94
|
+
{error && (
|
|
95
|
+
<Alert severity="error" sx={{ marginTop: '20px' }}>
|
|
96
|
+
{error}
|
|
97
|
+
</Alert>
|
|
98
|
+
)}
|
|
99
|
+
</Box>
|
|
100
|
+
)
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
export default LoginForm
|
|
@@ -1,103 +1,103 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
ListItemIcon,
|
|
3
|
+
ListItemText,
|
|
4
|
+
Menu,
|
|
5
|
+
MenuItem,
|
|
6
|
+
MenuListProps,
|
|
7
|
+
MenuProps,
|
|
8
|
+
styled,
|
|
9
9
|
} from '@mui/material'
|
|
10
|
-
import {cloneElement, ReactNode, useState} from 'react'
|
|
10
|
+
import { cloneElement, ReactNode, useState } from 'react'
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
anchor: any
|
|
14
|
+
loading?: boolean
|
|
15
|
+
menu: {
|
|
16
|
+
label: string | ReactNode
|
|
17
|
+
icon?: ReactNode
|
|
18
|
+
onClick: (props?: any) => any
|
|
19
|
+
component?: ReactNode
|
|
20
|
+
}[]
|
|
21
|
+
menuProps?: Omit<MenuProps, 'open'>
|
|
22
|
+
menuListProps?: MenuListProps
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export default function MenuButton({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
menu,
|
|
27
|
+
menuProps,
|
|
28
|
+
menuListProps,
|
|
29
|
+
loading = false,
|
|
30
|
+
anchor,
|
|
31
31
|
}: Props) {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const [anchorEl, setAnchorEl] = useState<any>(null)
|
|
33
|
+
const open = Boolean(anchorEl)
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
const handleClick = (event) => {
|
|
36
|
+
setAnchorEl(event.currentTarget)
|
|
37
|
+
}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const handleClose = () => {
|
|
40
|
+
setAnchorEl(null)
|
|
41
|
+
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const AnchorEl = cloneElement(anchor, {
|
|
44
|
+
onClick: handleClick,
|
|
45
|
+
})
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
47
|
+
return (
|
|
48
|
+
<>
|
|
49
|
+
{AnchorEl}
|
|
50
|
+
<Menu
|
|
51
|
+
elevation={2}
|
|
52
|
+
id="basic-menu"
|
|
53
|
+
anchorEl={anchorEl}
|
|
54
|
+
open={open}
|
|
55
|
+
onClose={handleClose}
|
|
56
|
+
MenuListProps={{
|
|
57
|
+
sx: { padding: 0 },
|
|
58
|
+
...menuListProps,
|
|
59
|
+
}}
|
|
60
|
+
anchorOrigin={{
|
|
61
|
+
vertical: 'bottom',
|
|
62
|
+
horizontal: 'right',
|
|
63
|
+
}}
|
|
64
|
+
transformOrigin={{
|
|
65
|
+
vertical: 'top',
|
|
66
|
+
horizontal: 'right',
|
|
67
|
+
}}
|
|
68
|
+
{...menuProps}
|
|
69
|
+
>
|
|
70
|
+
{menu.map((item, index) => (
|
|
71
|
+
<StyledMenuItem
|
|
72
|
+
sx={{ minWidth: '120px', width: '100%' }}
|
|
73
|
+
key={index}
|
|
74
|
+
onClick={() => {
|
|
75
|
+
handleClose()
|
|
76
|
+
item.onClick()
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
79
|
+
{item?.icon && <ListItemIcon>{item.icon}</ListItemIcon>}
|
|
80
|
+
<ListItemText>{item.label}</ListItemText>
|
|
81
|
+
</StyledMenuItem>
|
|
82
|
+
))}
|
|
83
|
+
</Menu>
|
|
84
|
+
</>
|
|
85
|
+
)
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
const StyledMenuItem = styled(MenuItem)(({theme}) => ({
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
88
|
+
const StyledMenuItem = styled(MenuItem)(({ theme }) => ({
|
|
89
|
+
padding: '10px 20px',
|
|
90
|
+
display: 'flex',
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
'& .MuiListItemIcon-root': {
|
|
93
|
+
minWidth: '24px',
|
|
94
|
+
},
|
|
95
|
+
'& .MuiSvgIcon-root': {
|
|
96
|
+
height: '18px',
|
|
97
|
+
width: '18px',
|
|
98
|
+
},
|
|
99
|
+
'& .MuiTypography-root': {
|
|
100
|
+
fontWeight: 600,
|
|
101
|
+
},
|
|
102
|
+
borderBottom: theme.borders.grayLight,
|
|
103
103
|
}))
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import {Close} from '@mui/icons-material'
|
|
1
|
+
import { Close } from '@mui/icons-material'
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
alpha,
|
|
4
|
+
Box,
|
|
5
|
+
ButtonProps,
|
|
6
|
+
Dialog,
|
|
7
|
+
DialogProps,
|
|
8
|
+
IconButton,
|
|
9
|
+
styled,
|
|
10
|
+
Typography,
|
|
11
11
|
} from '@mui/material'
|
|
12
|
-
import {createElement, ReactNode, useState} from 'react'
|
|
12
|
+
import { createElement, ReactNode, useState } from 'react'
|
|
13
13
|
|
|
14
|
-
const StyledDialogHeader = styled(Box)(({theme}) => ({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
const StyledDialogHeader = styled(Box)(({ theme }) => ({
|
|
15
|
+
height: '64px',
|
|
16
|
+
backgroundColor: alpha(theme.palette.text.secondary, 0.1),
|
|
17
|
+
display: 'flex',
|
|
18
|
+
justifyContent: 'space-between',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
padding: '0.6rem 1rem',
|
|
21
21
|
}))
|
|
22
22
|
|
|
23
|
-
const StyledDialogContent = styled(Box)(({theme}) => ({
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const StyledDialogContent = styled(Box)(({ theme }) => ({
|
|
24
|
+
width: '100%',
|
|
25
|
+
padding: '1rem',
|
|
26
26
|
}))
|
|
27
27
|
|
|
28
28
|
type ContentProps = {
|
|
29
|
-
|
|
29
|
+
close: () => void
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
interface DrawerButtonProps {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
button: any
|
|
34
|
+
content: (props: ContentProps) => ReactNode
|
|
35
|
+
title: string | ReactNode
|
|
36
|
+
btnTxt?: string | ReactNode
|
|
37
|
+
btnProps?: ButtonProps
|
|
38
|
+
dialogProps?: Omit<DialogProps, 'open'>
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export default function DialogButton({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
button: Button,
|
|
43
|
+
content,
|
|
44
|
+
title,
|
|
45
|
+
btnTxt,
|
|
46
|
+
btnProps,
|
|
47
|
+
dialogProps,
|
|
48
48
|
}: DrawerButtonProps) {
|
|
49
|
-
|
|
49
|
+
const [open, setOpen] = useState(false)
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
const ButtonEl = (props) => (
|
|
52
|
+
<Button {...props} {...btnProps}>
|
|
53
|
+
{btnTxt}
|
|
54
|
+
</Button>
|
|
55
|
+
)
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
const MyButton = createElement(ButtonEl, {
|
|
58
|
+
onClick: () => setOpen(true),
|
|
59
|
+
})
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
61
|
+
const onClose = () => {
|
|
62
|
+
setOpen(false)
|
|
63
|
+
}
|
|
64
|
+
return (
|
|
65
|
+
<>
|
|
66
|
+
{MyButton}
|
|
67
|
+
<Dialog
|
|
68
|
+
PaperProps={{ sx: { borderRadius: '10px' } }}
|
|
69
|
+
fullWidth
|
|
70
|
+
onClose={onClose}
|
|
71
|
+
open={open}
|
|
72
|
+
transitionDuration={200}
|
|
73
|
+
{...dialogProps}
|
|
74
|
+
>
|
|
75
|
+
<StyledDialogHeader>
|
|
76
|
+
<Typography fontWeight={600}>{title}</Typography>
|
|
77
|
+
<IconButton onClick={onClose}>
|
|
78
|
+
<Close />
|
|
79
|
+
</IconButton>
|
|
80
|
+
</StyledDialogHeader>
|
|
81
|
+
<StyledDialogContent>{content({ close: onClose })}</StyledDialogContent>
|
|
82
|
+
</Dialog>
|
|
83
|
+
</>
|
|
84
|
+
)
|
|
85
85
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {Box, styled} from '@mui/material'
|
|
1
|
+
import { Box, styled } from '@mui/material'
|
|
2
2
|
import ErrorBoundary from './ErrorBoundary'
|
|
3
3
|
|
|
4
4
|
const StyledPageContent = styled(Box)(() => ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
paddingLeft: '25px',
|
|
6
|
+
paddingRight: '25px',
|
|
7
|
+
marginTop: '16px',
|
|
8
|
+
paddingBottom: '3rem',
|
|
9
9
|
}))
|
|
10
10
|
|
|
11
11
|
export function PageContent(props) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
return (
|
|
13
|
+
<StyledPageContent style={props.style}>
|
|
14
|
+
<ErrorBoundary>{props.children}</ErrorBoundary>
|
|
15
|
+
</StyledPageContent>
|
|
16
|
+
)
|
|
17
17
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Box, Button, Typography } from
|
|
2
|
-
import axios from
|
|
3
|
-
import React, { useEffect, useState } from
|
|
4
|
-
import { pagenotfound } from
|
|
1
|
+
import { Box, Button, Typography } from '@mui/material'
|
|
2
|
+
import axios from 'axios'
|
|
3
|
+
import React, { useEffect, useState } from 'react'
|
|
4
|
+
import { pagenotfound } from '../assets/images'
|
|
5
5
|
|
|
6
6
|
function PageNotFound() {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
9
|
<Box
|
|
10
10
|
sx={{
|
|
11
|
-
width:
|
|
12
|
-
display:
|
|
13
|
-
flexDirection:
|
|
14
|
-
alignItems:
|
|
15
|
-
justifyContent:
|
|
16
|
-
marginTop:
|
|
11
|
+
width: '100%',
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
justifyContent: 'center',
|
|
16
|
+
marginTop: '50px',
|
|
17
17
|
}}
|
|
18
18
|
>
|
|
19
19
|
<img src={pagenotfound} alt="page not found" width={470} />
|
|
20
20
|
<Typography variant="h1">Page Not Found.</Typography>
|
|
21
21
|
</Box>
|
|
22
22
|
</>
|
|
23
|
-
)
|
|
23
|
+
)
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export default PageNotFound
|
|
26
|
+
export default PageNotFound
|