|
1 | 1 | import BackButton from '@components/BackButton' |
2 | 2 | import Button from '@components/Button' |
3 | 3 | import Chip from '@components/Chip' |
4 | | -import React, { Suspense, useState } from 'react' |
5 | | -import { useEffect } from 'react' |
| 4 | +import React, { Suspense, lazy, useState, useEffect } from 'react' |
6 | 5 | import { useLocation, useNavigate, useParams } from 'react-router-dom' |
7 | 6 | import { IRecordDataType } from 'types/recordData' |
8 | 7 | import { |
@@ -30,12 +29,12 @@ import { |
30 | 29 | import { SessionStorage } from '@utils/sessionStorage' |
31 | 30 | import { PREVIOUS_URL } from '@assets/constant/others' |
32 | 31 |
|
33 | | -const MoreButton = React.lazy(() => import('@components/MoreButton')) |
34 | | -const NotFound = React.lazy(() => import('@pages/NotFound/NotFound')) |
35 | | -const Alert = React.lazy(() => import('@components/Alert')) |
36 | | -const Modal = React.lazy(() => import('@components/Modal')) |
37 | | -const MemoizedShareModal = React.lazy(() => import('./ShareModal')) |
38 | | -const EditModal = React.lazy(() => import('./EditModal')) |
| 32 | +const MoreButton = lazy(() => import('@components/MoreButton')) |
| 33 | +const NotFound = lazy(() => import('@pages/NotFound/NotFound')) |
| 34 | +const Alert = lazy(() => import('@components/Alert')) |
| 35 | +const Modal = lazy(() => import('@components/Modal')) |
| 36 | +const MemoizedShareModal = lazy(() => import('./ShareModal')) |
| 37 | +const EditModal = lazy(() => import('./EditModal')) |
39 | 38 |
|
40 | 39 | export default function DetailRecord() { |
41 | 40 | const [shareStatus, setShareStatus] = useState(false) |
|
0 commit comments