mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-21 19:29:51 -04:00
center text in authenticator
This commit is contained in:
parent
bff71a0a3a
commit
94b6c521ea
|
@ -40,14 +40,26 @@ export default function Authenticator() {
|
||||||
refresh();
|
refresh();
|
||||||
}, [token, refresh]);
|
}, [token, refresh]);
|
||||||
|
|
||||||
|
let children: JSX.Element;
|
||||||
|
|
||||||
if (pending) {
|
if (pending) {
|
||||||
return <h1>Signing In</h1>;
|
children = <h1>Signing In</h1>;
|
||||||
}
|
} else if (token) {
|
||||||
|
children = <Redirect to="/" />;
|
||||||
if (token) {
|
} else {
|
||||||
return <Redirect to="/" />;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we aren't pending anymore, but don't have a token, we must have errored
|
// If we aren't pending anymore, but don't have a token, we must have errored
|
||||||
return <h1>Sign In Error</h1>;
|
children = <h1>Sign In Error</h1>;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
alignItems: 'center',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user