Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding skeleton login page #201

Merged
merged 2 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions frontend/src/containers/pages/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,26 @@ export default function LoginPage() {
}
}, [user]);

useEffect(() => {
if (!loading && !user) {
signInUsingGoogle();
}
}, [loading]);
// useEffect(() => {
// if (!loading && !user) {
// signInUsingGoogle();
// }
// }, [loading]);

return <LoadingPage text="Redirecting..." />;
return (
<div>
<button
type="button"
onClick={() => {
if (!loading && !user) {
signInUsingGoogle();
} else {
<LoadingPage text="logging in..." />;
}
}}
>
WIP Login
</button>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,12 @@
exports[`Login page snapshot test 1`] = `
<body>
<div>
<div
class="MuiGrid-root MuiGrid-container MuiGrid-direction-xs-column MuiGrid-align-items-xs-center MuiGrid-justify-content-xs-center"
style="min-height: 100vh;"
>
<div
class="MuiGrid-root MuiGrid-container MuiGrid-direction-xs-column MuiGrid-align-items-xs-center MuiGrid-justify-content-xs-center"
<div>
<button
type="button"
>
<div
class="MuiGrid-root MuiGrid-item"
>
<div
class="MuiCircularProgress-root MuiCircularProgress-colorPrimary MuiCircularProgress-indeterminate"
role="progressbar"
style="width: 40px; height: 40px; color: rgb(0, 128, 167);"
>
<svg
class="MuiCircularProgress-svg"
viewBox="22 22 44 44"
>
<circle
class="MuiCircularProgress-circle MuiCircularProgress-circleIndeterminate"
cx="44"
cy="44"
fill="none"
r="20.2"
stroke-width="3.6"
/>
</svg>
</div>
</div>
<div
class="MuiGrid-root MuiGrid-item"
>
<p
class="MuiTypography-root MuiTypography-body1"
>
Redirecting...
</p>
</div>
</div>
WIP Login
</button>
</div>
</div>
</body>
Expand Down
Loading