feat(preferences): not logged in segment (#649)

* feat(preferences): not logged in segment

* Update app/assets/javascripts/preferences/panes/account/Authentication.tsx

Co-authored-by: Mo Bitar <mo@standardnotes.org>

* Update app/assets/javascripts/preferences/panes/account/Authentication.tsx

Co-authored-by: Mo Bitar <mo@standardnotes.org>

Co-authored-by: Mo Bitar <mo@standardnotes.org>
This commit is contained in:
Gorjan Petrovski
2021-09-27 18:01:12 +02:00
committed by GitHub
parent 150f7a7835
commit b312df41a6
9 changed files with 74 additions and 12 deletions

View File

@@ -3,6 +3,7 @@ import {
SubscriptionWrapper,
Credentials,
LogOutWrapper,
Authentication,
} from '@/preferences/panes/account';
import { PreferencesPane } from '@/preferences/components';
import { observer } from 'mobx-react-lite';
@@ -16,6 +17,17 @@ type Props = {
export const AccountPreferences = observer(
({ application, appState }: Props) => {
const isLoggedIn = application.getUser();
if (!isLoggedIn) {
return (
<PreferencesPane>
<Authentication application={application} appState={appState} />
<LogOutWrapper application={application} appState={appState} />
</PreferencesPane>
);
}
return (
<PreferencesPane>
<Credentials application={application} />