diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2022-10-13 04:07:30 +0900 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-10-28 19:24:02 +0200 |
commit | 5d4d4a69f65ea8612d6e992282c061ba9a01a8be (patch) | |
tree | 19c07d29422244b9e1910533616b6dc0c715d79c /app/javascript/flavours/glitch/features/ui | |
parent | 1850166de92058161d9e0607bb1528b738aca0c7 (diff) |
[Glitch] Redirect non-logged-in user to owner statuses on single user mode
Port 7afc6a630c76fb071bd189af3ac1366efc82f819 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/index.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index d5abefb19..eb5c3e87b 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -56,7 +56,7 @@ import { PrivacyPolicy, } from './util/async-components'; import { HotKeys } from 'react-hotkeys'; -import { me } from 'flavours/glitch/initial_state'; +import initialState, { me, owner, singleUserMode } from '../../initial_state'; import { closeOnboarding, INTRODUCTION_VERSION } from 'flavours/glitch/actions/onboarding'; import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; import { Helmet } from 'react-helmet'; @@ -175,6 +175,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 />; } |