@@ -28,7 +28,7 @@ import { ChevronDoubleLeftIcon } from '@/components/icon/solid';
28
28
import { ArrowLeftIcon } from '@/components/Icons' ;
29
29
// import { useDebouncedCallback } from 'use-debounce'
30
30
import { useAsyncState } from '@/hooks/useAsyncState' ;
31
- import useInterval from '@/hooks/useInterval' ;
31
+ // import useInterval from '@/hooks/useInterval';
32
32
import useMounted from '@/hooks/useMounted' ;
33
33
// import PreviewIcon from 'public/images/svg/preview.svg'
34
34
@@ -191,21 +191,22 @@ export default function LearnPublish({ params }) {
191
191
. finally ( ( ) => setIsLoading ( false ) ) ;
192
192
} ) ;
193
193
194
- useInterval ( ( ) => {
195
- if ( contents ) {
196
- addSeries ( { ...contents } )
197
- // FIXME:
198
- // I don't know how to prevent accessing page when user has no permissions for now,
199
- // so I prevent by this a little tricky way.
200
- . then ( res => {
201
- if ( res . code === 403 ) {
202
- toast . error ( res . message , {
203
- onClose : ( ) => replace ( '/' ) ,
204
- } ) ;
205
- }
206
- } ) ;
207
- }
208
- } , 10000 ) ;
194
+ // TODO: disable before this module being refactored
195
+ // useInterval(() => {
196
+ // if (contents) {
197
+ // addSeries({...contents})
198
+ // // FIXME:
199
+ // // I don't know how to prevent accessing page when user has no permissions for now,
200
+ // // so I prevent by this a little tricky way.
201
+ // .then(res => {
202
+ // if (res.code === 403) {
203
+ // toast.error(res.message, {
204
+ // onClose: () => replace('/'),
205
+ // });
206
+ // }
207
+ // });
208
+ // }
209
+ // }, 10000);
209
210
210
211
const publish = async ( ) => {
211
212
setPublishing ( true ) ;
0 commit comments