feat: hide some prefs if not logged in (#979)

This commit is contained in:
Aman Harwara
2022-04-15 20:28:32 +05:30
committed by GitHub
parent ec8b307235
commit 9dafdeeddb
2 changed files with 14 additions and 12 deletions

View File

@@ -91,6 +91,7 @@ export const Listed = observer(({ application }: Props) => {
</a> </a>
</Text> </Text>
</PreferencesSegment> </PreferencesSegment>
{application.getUser() && (
<PreferencesSegment> <PreferencesSegment>
<Subtitle>Get Started</Subtitle> <Subtitle>Get Started</Subtitle>
<Text>Create a free Listed author account to get started.</Text> <Text>Create a free Listed author account to get started.</Text>
@@ -102,6 +103,7 @@ export const Listed = observer(({ application }: Props) => {
onClick={registerNewAccount} onClick={registerNewAccount}
/> />
</PreferencesSegment> </PreferencesSegment>
)}
</PreferencesGroup> </PreferencesGroup>
</PreferencesPane> </PreferencesPane>
) )

View File

@@ -20,6 +20,6 @@ export const Security: FunctionComponent<SecurityProps> = (props) => (
<Protections application={props.application} /> <Protections application={props.application} />
<TwoFactorAuthWrapper mfaProvider={props.mfaProvider} userProvider={props.userProvider} /> <TwoFactorAuthWrapper mfaProvider={props.mfaProvider} userProvider={props.userProvider} />
<PasscodeLock appState={props.appState} application={props.application} /> <PasscodeLock appState={props.appState} application={props.application} />
<Privacy application={props.application} /> {props.application.getUser() && <Privacy application={props.application} />}
</PreferencesPane> </PreferencesPane>
) )