Fixed rendering error on /start when not logged in (#30023)

main-rebase-security-fix
Tim Rogers 2024-04-22 03:53:08 -05:00 committed by GitHub
parent 3655fb6a22
commit 75163d9daf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 37 additions and 34 deletions

View File

@ -16,6 +16,7 @@ import EditNoteIcon from '@/material-icons/400-24px/edit_note.svg?react';
import PersonAddIcon from '@/material-icons/400-24px/person_add.svg?react'; import PersonAddIcon from '@/material-icons/400-24px/person_add.svg?react';
import { focusCompose } from 'mastodon/actions/compose'; import { focusCompose } from 'mastodon/actions/compose';
import { Icon } from 'mastodon/components/icon'; import { Icon } from 'mastodon/components/icon';
import { NotSignedInIndicator } from 'mastodon/components/not_signed_in_indicator';
import Column from 'mastodon/features/ui/components/column'; import Column from 'mastodon/features/ui/components/column';
import { me } from 'mastodon/initial_state'; import { me } from 'mastodon/initial_state';
import { useAppSelector } from 'mastodon/store'; import { useAppSelector } from 'mastodon/store';
@ -42,6 +43,7 @@ const Onboarding = () => {
return ( return (
<Column> <Column>
{account ? (
<Switch> <Switch>
<Route path='/start' exact> <Route path='/start' exact>
<div className='scrollable privacy-policy'> <div className='scrollable privacy-policy'>
@ -78,6 +80,7 @@ const Onboarding = () => {
<Route path='/start/follows' component={Follows} /> <Route path='/start/follows' component={Follows} />
<Route path='/start/share' component={Share} /> <Route path='/start/share' component={Share} />
</Switch> </Switch>
) : <NotSignedInIndicator />}
<Helmet> <Helmet>
<meta name='robots' content='noindex' /> <meta name='robots' content='noindex' />