feat(preferences): no-subscription for non logged in users (#676)

* feat(preferences): no-subscription for non logged in users

* fix: check if user has account using application.hasAccount()
This commit is contained in:
Gorjan Petrovski
2021-10-11 17:29:41 +02:00
committed by GitHub
parent e0c6aab03d
commit 6f18664564
6 changed files with 18 additions and 23 deletions

View File

@@ -17,12 +17,12 @@ type Props = {
export const AccountPreferences = observer(
({ application, appState }: Props) => {
const isLoggedIn = application.getUser();
if (!isLoggedIn) {
if (!application.hasAccount()) {
return (
<PreferencesPane>
<Authentication application={application} appState={appState} />
<SubscriptionWrapper application={application} />
<SignOutWrapper application={application} appState={appState} />
</PreferencesPane>
);
@@ -32,7 +32,6 @@ export const AccountPreferences = observer(
<PreferencesPane>
<Credentials application={application} />
<Sync application={application} />
<SubscriptionWrapper application={application} />
<SignOutWrapper application={application} appState={appState} />
</PreferencesPane>
);