mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed boris infinite reloading
This commit is contained in:
parent
e071665561
commit
19af0c0856
1 changed files with 1 additions and 3 deletions
|
@ -11,7 +11,6 @@ import { useBoris } from '~/utils/hooks/boris/useBoris';
|
||||||
|
|
||||||
const BorisPage: VFC = () => {
|
const BorisPage: VFC = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const node = useShallowSelect(selectNode);
|
|
||||||
const {
|
const {
|
||||||
comments,
|
comments,
|
||||||
comment_count: count,
|
comment_count: count,
|
||||||
|
@ -23,9 +22,8 @@ const BorisPage: VFC = () => {
|
||||||
const { title, setIsBetaTester, isTester, stats } = useBoris(comments);
|
const { title, setIsBetaTester, isTester, stats } = useBoris(comments);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (node.is_loading) return;
|
|
||||||
dispatch(nodeLoadNode(696, 'DESC'));
|
dispatch(nodeLoadNode(696, 'DESC'));
|
||||||
}, [dispatch, node.is_loading]);
|
}, [dispatch]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CommentContextProvider
|
<CommentContextProvider
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue