fix(frontend): redirect from /setup if already initialized (#1238)

pull/1245/head
TheCatLady 4 years ago committed by GitHub
parent 380d36119f
commit 80165038fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,7 +63,11 @@ const Setup: React.FC = () => {
<LanguagePicker />
</div>
<div className="relative z-40 px-4 sm:mx-auto sm:w-full sm:max-w-4xl">
<img src="/logo.png" className="max-w-full sm:max-w-md" alt="Logo" />
<img
src="/logo.png"
className="max-w-full sm:max-w-md sm:mx-auto"
alt="Logo"
/>
<AppDataWarning />
<nav className="relative z-50">
<ul

@ -180,7 +180,7 @@ CoreApp.getInitialProps = async (initialProps) => {
);
user = response.data;
if (router.pathname.match(/login/)) {
if (router.pathname.match(/(setup|login)/)) {
ctx.res.writeHead(307, {
Location: '/',
});

Loading…
Cancel
Save