about summary refs log tree commit diff
path: root/src/view/shell/desktop-web/shell.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-07-18 15:24:37 -0500
committerPaul Frazee <pfrazee@gmail.com>2022-07-18 15:24:37 -0500
commit1d00f3b9840003601175d5394af34b29222db4e3 (patch)
treef835e910d5f11b84ce2403e307caea080c34ab79 /src/view/shell/desktop-web/shell.tsx
parentde87ec17d1673855fdfe2ccd125d734591969dd4 (diff)
downloadvoidsky-1d00f3b9840003601175d5394af34b29222db4e3.tar.zst
Add mock API and reorg code for clarity
Diffstat (limited to 'src/view/shell/desktop-web/shell.tsx')
-rw-r--r--src/view/shell/desktop-web/shell.tsx35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/view/shell/desktop-web/shell.tsx b/src/view/shell/desktop-web/shell.tsx
new file mode 100644
index 000000000..13acbbfed
--- /dev/null
+++ b/src/view/shell/desktop-web/shell.tsx
@@ -0,0 +1,35 @@
+import React from 'react'
+import {observer} from 'mobx-react-lite'
+import {View, StyleSheet} from 'react-native'
+import {DesktopLeftColumn} from './left-column'
+import {DesktopRightColumn} from './right-column'
+import {useStores} from '../../../state'
+
+export const DesktopWebShell: React.FC = observer(({children}) => {
+  const store = useStores()
+  return (
+    <View style={styles.outerContainer}>
+      {store.session.isAuthed ? (
+        <>
+          <DesktopLeftColumn />
+          <View style={styles.innerContainer}>{children}</View>
+          <DesktopRightColumn />
+        </>
+      ) : (
+        <View style={styles.innerContainer}>{children}</View>
+      )}
+    </View>
+  )
+})
+
+const styles = StyleSheet.create({
+  outerContainer: {
+    height: '100%',
+  },
+  innerContainer: {
+    marginLeft: 'auto',
+    marginRight: 'auto',
+    width: '600px',
+    height: '100%',
+  },
+})