Skip to content

Commit

Permalink
Merge pull request #130 from Macktireh/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Macktireh authored Aug 2, 2024
2 parents 5892314 + cb1f3d6 commit 6f99c2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const App: React.FC<propsTypes> = ({ getCurrentUserAction }) => {
if (!flag.current) {
(async () => {
await getCurrentUserAction();
setTimeout(() => setLoading(false), 800);
setTimeout(() => setLoading(false), 2500);
flag.current = true;
})();
}
Expand Down
6 changes: 3 additions & 3 deletions src/helper/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ const AuthProvider: React.FC<TProps> = ({ isPublic, isAuthenticated, children, g
let [searchParams, setSearchParams] = useSearchParams();

React.useEffect(() => {
const code = searchParams.get("code")
if (code && isAuthenticated === false || isAuthenticated === null) {
const code = searchParams.get("code")
if (code && (isAuthenticated === false || isAuthenticated === null)) {
(async () => {
await googleLoginAction( code );
setTimeout(() => setLoading(false), 800);
setTimeout(() => setLoading(false), 1000);
})();
} else if (isAuthenticated !== null) setLoading(false);
}, [loading, isAuthenticated]);
Expand Down

0 comments on commit 6f99c2d

Please sign in to comment.