Skip to content

A local-first personal finance app

Add “Stop using a server” button

Jed Fox9abe7fa2ce26
diff --git a/packages/desktop-client/src/components/manager/ConfigServer.js b/packages/desktop-client/src/components/manager/ConfigServer.js
index b9ac60514c..8948a03471 100644
--- a/packages/desktop-client/src/components/manager/ConfigServer.js
+++ b/packages/desktop-client/src/components/manager/ConfigServer.js
@@ -129,26 +129,32 @@ export default function ConfigServer() {
)}
</form>
- {currentUrl == null && (
- <View
- style={{
- marginTop: 15,
- flexDirection: 'row',
- justifyContent: 'center'
- }}
- >
- <Button
- bare
- style={{ color: colors.n4, marginRight: 15 }}
- onClick={onSameDomain}
- >
- Use {window.location.origin.replace(/https?:\/\//, '')}
- </Button>
+ <View
+ style={{
+ marginTop: 15,
+ flexDirection: 'row',
+ justifyContent: 'center'
+ }}
+ >
+ {currentUrl ? (
<Button bare style={{ color: colors.n4 }} onClick={onSkip}>
- Don't use a server
+ Stop using a server
</Button>
- </View>
- )}
+ ) : (
+ <>
+ <Button
+ bare
+ style={{ color: colors.n4, marginRight: 15 }}
+ onClick={onSameDomain}
+ >
+ Use {window.location.origin.replace(/https?:\/\//, '')}
+ </Button>
+ <Button bare style={{ color: colors.n4 }} onClick={onSkip}>
+ Don't use a server
+ </Button>
+ </>
+ )}
+ </View>
</View>
</>
);