mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 03:26:45 +00:00
(cherry picked from commit e93b9692a1c149f6caca84291dba5be067f5b539) Co-authored-by: Dean <me@dgardiner.net>
This commit is contained in:
parent
993849813f
commit
b0fc42d906
@ -1,5 +1,6 @@
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { Card, Container, Group, Loader, Stack, Text } from '@mantine/core';
|
||||
import { useDebouncedCallback } from '@mantine/hooks';
|
||||
import { useEffect } from 'react';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
|
||||
@ -9,8 +10,10 @@ export default function Logged_In() {
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
|
||||
const checkLoginStateDebounced = useDebouncedCallback(checkLoginState, 300);
|
||||
|
||||
useEffect(() => {
|
||||
checkLoginState(navigate, location?.state);
|
||||
checkLoginStateDebounced(navigate, location?.state);
|
||||
}, [navigate]);
|
||||
|
||||
return (
|
||||
|
Loading…
x
Reference in New Issue
Block a user