center text in authenticator

This commit is contained in:
Michael Fatemi 2021-07-03 01:10:57 -04:00
parent bff71a0a3a
commit 94b6c521ea

View File

@ -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>
);
} }