mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-31 04:43:34 +01:00
fix (setup): weird behavior when setting up the app
This commit is contained in:
parent
cc65e1d6dd
commit
c8c4f701da
1 changed files with 2 additions and 3 deletions
|
|
@ -30,12 +30,11 @@ function AdminOnly(WrappedComponent) {
|
|||
return () => clearInterval(timeout);
|
||||
}, []);
|
||||
|
||||
if (isAdmin === true) {
|
||||
if (isAdmin === true || /\/admin\/setup$/.test(location.pathname)) {
|
||||
return ( <WrappedComponent {...props} /> );
|
||||
} else if (isAdmin === false) {
|
||||
return ( <LoginPage reload={refresh} /> );
|
||||
}
|
||||
|
||||
return ( <LoadingPage /> );
|
||||
};
|
||||
}
|
||||
|
|
@ -60,7 +59,7 @@ export default AdminOnly((props) => {
|
|||
/>
|
||||
<Route
|
||||
path={match.url + "/logs"}
|
||||
render={() =><LogPage isSaving={setIsSaving}/>} />
|
||||
render={() => <LogPage isSaving={setIsSaving}/>} />
|
||||
<Route path={match.url + "/setup"} component={SetupPage} />
|
||||
<Route path={match.url} component={HomePage} />
|
||||
</Switch>
|
||||
|
|
|
|||
Loading…
Reference in a new issue