Redirect non-logged-in user to owner statuses on single user mode (#19333)
This commit is contained in:
parent
5f6c0d63e3
commit
7afc6a630c
6 changed files with 77 additions and 20 deletions
|
@ -54,7 +54,7 @@ import {
|
|||
About,
|
||||
PrivacyPolicy,
|
||||
} from './util/async-components';
|
||||
import { me } from '../../initial_state';
|
||||
import initialState, { me, owner, singleUserMode } from '../../initial_state';
|
||||
import { closeOnboarding, INTRODUCTION_VERSION } from 'mastodon/actions/onboarding';
|
||||
import Header from './components/header';
|
||||
|
||||
|
@ -161,6 +161,8 @@ class SwitchingColumnsArea extends React.PureComponent {
|
|||
} else {
|
||||
redirect = <Redirect from='/' to='/getting-started' exact />;
|
||||
}
|
||||
} else if (singleUserMode && owner && initialState?.accounts[owner]) {
|
||||
redirect = <Redirect from='/' to={`/@${initialState.accounts[owner].username}`} exact />;
|
||||
} else {
|
||||
redirect = <Redirect from='/' to='/explore' exact />;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue