fix(frontend): redirect from /setup if already initialized (#1238)
This commit is contained in:
@@ -63,7 +63,11 @@ const Setup: React.FC = () => {
|
|||||||
<LanguagePicker />
|
<LanguagePicker />
|
||||||
</div>
|
</div>
|
||||||
<div className="relative z-40 px-4 sm:mx-auto sm:w-full sm:max-w-4xl">
|
<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 />
|
<AppDataWarning />
|
||||||
<nav className="relative z-50">
|
<nav className="relative z-50">
|
||||||
<ul
|
<ul
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ CoreApp.getInitialProps = async (initialProps) => {
|
|||||||
);
|
);
|
||||||
user = response.data;
|
user = response.data;
|
||||||
|
|
||||||
if (router.pathname.match(/login/)) {
|
if (router.pathname.match(/(setup|login)/)) {
|
||||||
ctx.res.writeHead(307, {
|
ctx.res.writeHead(307, {
|
||||||
Location: '/',
|
Location: '/',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user