Skip to content
Snippets Groups Projects
Unverified Commit f2163af9 authored by Jed Fox's avatar Jed Fox Committed by GitHub
Browse files

Make the “Not logged in” warning a button (#674)

parent 1f486c59
No related branches found
No related tags found
No related merge requests found
...@@ -54,11 +54,14 @@ function LoggedInUser({ ...@@ -54,11 +54,14 @@ function LoggedInUser({
} }
async function onClick() { async function onClick() {
if (serverUrl) { if (!serverUrl) {
await closeBudget();
window.__history.push('/config-server');
} else if (userData) {
setMenuOpen(true); setMenuOpen(true);
} else { } else {
await closeBudget(); await closeBudget();
window.__history.push('/config-server'); window.__history.push('/login');
} }
} }
...@@ -97,7 +100,11 @@ function LoggedInUser({ ...@@ -97,7 +100,11 @@ function LoggedInUser({
</View> </View>
); );
} else { } else {
return <View style={[{ color }, style]}>Not logged in</View>; return (
<Button bare onClick={onClick} style={[{ color }, style]}>
Not logged in
</Button>
);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment