Skip to content

Commit

Permalink
fix(frontend): redirect from /setup if already initialized (#1238)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCatLady committed Mar 21, 2021
1 parent 380d361 commit 8016503
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/Setup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: '/',
});
Expand Down

0 comments on commit 8016503

Please sign in to comment.