Skip to content

Commit 03a4ea0

Browse files
committed
fix(app): disable before creator course module being refactored
1 parent 0e5b027 commit 03a4ea0

File tree

1 file changed

+17
-16
lines changed
  • src/app/creator/learn/[type]/[id]

1 file changed

+17
-16
lines changed

src/app/creator/learn/[type]/[id]/page.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { ChevronDoubleLeftIcon } from '@/components/icon/solid';
2828
import { ArrowLeftIcon } from '@/components/Icons';
2929
// import { useDebouncedCallback } from 'use-debounce'
3030
import { useAsyncState } from '@/hooks/useAsyncState';
31-
import useInterval from '@/hooks/useInterval';
31+
// import useInterval from '@/hooks/useInterval';
3232
import useMounted from '@/hooks/useMounted';
3333
// import PreviewIcon from 'public/images/svg/preview.svg'
3434

@@ -191,21 +191,22 @@ export default function LearnPublish({ params }) {
191191
.finally(() => setIsLoading(false));
192192
});
193193

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);
209210

210211
const publish = async () => {
211212
setPublishing(true);

0 commit comments

Comments
 (0)