about summary refs log tree commit diff
path: root/src/view
diff options
context:
space:
mode:
Diffstat (limited to 'src/view')
-rw-r--r--src/view/com/login/CreateAccount.tsx8
-rw-r--r--src/view/com/login/Signin.tsx8
-rw-r--r--src/view/com/util/LoadingPlaceholder.tsx2
-rw-r--r--src/view/com/util/UserInfoText.tsx8
-rw-r--r--src/view/com/util/ViewHeader.tsx2
-rw-r--r--src/view/com/util/gestures/SwipeAndZoom.tsx20
-rw-r--r--src/view/com/util/text/RichText.tsx7
-rw-r--r--src/view/screens/Contacts.tsx2
-rw-r--r--src/view/screens/Profile.tsx4
-rw-r--r--src/view/screens/Search.tsx2
10 files changed, 45 insertions, 18 deletions
diff --git a/src/view/com/login/CreateAccount.tsx b/src/view/com/login/CreateAccount.tsx
index 279a55f52..349c48ef7 100644
--- a/src/view/com/login/CreateAccount.tsx
+++ b/src/view/com/login/CreateAccount.tsx
@@ -48,12 +48,16 @@ export const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => {
     setServiceDescription(undefined)
     store.session.describeService(serviceUrl).then(
       desc => {
-        if (aborted) return
+        if (aborted) {
+          return
+        }
         setServiceDescription(desc)
         setUserDomain(desc.availableUserDomains[0])
       },
       err => {
-        if (aborted) return
+        if (aborted) {
+          return
+        }
         store.log.warn(
           `Failed to fetch service description for ${serviceUrl}`,
           err,
diff --git a/src/view/com/login/Signin.tsx b/src/view/com/login/Signin.tsx
index f60b637b7..e99aaa651 100644
--- a/src/view/com/login/Signin.tsx
+++ b/src/view/com/login/Signin.tsx
@@ -47,11 +47,15 @@ export const Signin = ({onPressBack}: {onPressBack: () => void}) => {
     setError('')
     store.session.describeService(serviceUrl).then(
       desc => {
-        if (aborted) return
+        if (aborted) {
+          return
+        }
         setServiceDescription(desc)
       },
       err => {
-        if (aborted) return
+        if (aborted) {
+          return
+        }
         store.log.warn(
           `Failed to fetch service description for ${serviceUrl}`,
           err,
diff --git a/src/view/com/util/LoadingPlaceholder.tsx b/src/view/com/util/LoadingPlaceholder.tsx
index b51191bd9..207a3f5d2 100644
--- a/src/view/com/util/LoadingPlaceholder.tsx
+++ b/src/view/com/util/LoadingPlaceholder.tsx
@@ -76,7 +76,7 @@ export function PostLoadingPlaceholder({
               strokeWidth={1.7}
             />
           </View>
-          <View style={s.flex1}></View>
+          <View style={s.flex1} />
         </View>
       </View>
     </View>
diff --git a/src/view/com/util/UserInfoText.tsx b/src/view/com/util/UserInfoText.tsx
index db6696a9b..5cdfd1345 100644
--- a/src/view/com/util/UserInfoText.tsx
+++ b/src/view/com/util/UserInfoText.tsx
@@ -40,11 +40,15 @@ export function UserInfoText({
     let aborted = false
     store.profiles.getProfile(did).then(
       v => {
-        if (aborted) return
+        if (aborted) {
+          return
+        }
         setProfile(v.data)
       },
       _err => {
-        if (aborted) return
+        if (aborted) {
+          return
+        }
         setFailed(true)
       },
     )
diff --git a/src/view/com/util/ViewHeader.tsx b/src/view/com/util/ViewHeader.tsx
index 230273709..d1e9b397b 100644
--- a/src/view/com/util/ViewHeader.tsx
+++ b/src/view/com/util/ViewHeader.tsx
@@ -36,7 +36,7 @@ export const ViewHeader = observer(function ViewHeader({
     store.shell.setMainMenuOpen(true)
   }
   const onPressSearch = () => {
-    store.nav.navigate(`/search`)
+    store.nav.navigate('/search')
   }
   const onPressReconnect = () => {
     store.session.connect().catch(e => {
diff --git a/src/view/com/util/gestures/SwipeAndZoom.tsx b/src/view/com/util/gestures/SwipeAndZoom.tsx
index dc3a9f54c..881eea094 100644
--- a/src/view/com/util/gestures/SwipeAndZoom.tsx
+++ b/src/view/com/util/gestures/SwipeAndZoom.tsx
@@ -88,11 +88,21 @@ export function SwipeAndZoom({
   }
 
   const canDir = (d: Dir) => {
-    if (d === Dir.Left) return canSwipeLeft
-    if (d === Dir.Right) return canSwipeRight
-    if (d === Dir.Up) return canSwipeUp
-    if (d === Dir.Down) return canSwipeDown
-    if (d === Dir.Zoom) return zoomEnabled
+    if (d === Dir.Left) {
+      return canSwipeLeft
+    }
+    if (d === Dir.Right) {
+      return canSwipeRight
+    }
+    if (d === Dir.Up) {
+      return canSwipeUp
+    }
+    if (d === Dir.Down) {
+      return canSwipeDown
+    }
+    if (d === Dir.Zoom) {
+      return zoomEnabled
+    }
     return false
   }
   const isHorz = (d: Dir) => d === Dir.Left || d === Dir.Right
diff --git a/src/view/com/util/text/RichText.tsx b/src/view/com/util/text/RichText.tsx
index a7bc92a45..f04f4566d 100644
--- a/src/view/com/util/text/RichText.tsx
+++ b/src/view/com/util/text/RichText.tsx
@@ -46,8 +46,11 @@ export function RichText({
       </Text>
     )
   }
-  if (!style) style = []
-  else if (!Array.isArray(style)) style = [style]
+  if (!style) {
+    style = []
+  } else if (!Array.isArray(style)) {
+    style = [style]
+  }
   entities.sort(sortByIndex)
   const segments = Array.from(toSegments(text, entities))
   const els = []
diff --git a/src/view/screens/Contacts.tsx b/src/view/screens/Contacts.tsx
index b22e52fe5..600cd78c6 100644
--- a/src/view/screens/Contacts.tsx
+++ b/src/view/screens/Contacts.tsx
@@ -15,7 +15,7 @@ export const Contacts = ({navIdx, visible, params}: ScreenParams) => {
 
   useEffect(() => {
     if (visible) {
-      store.nav.setTitle(navIdx, `Contacts`)
+      store.nav.setTitle(navIdx, 'Contacts')
     }
   }, [store, visible])
 
diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx
index d701fba0d..bd60ca61c 100644
--- a/src/view/screens/Profile.tsx
+++ b/src/view/screens/Profile.tsx
@@ -40,7 +40,9 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => {
     } else {
       store.nav.setTitle(navIdx, params.name)
       uiState.setup().then(() => {
-        if (aborted) return
+        if (aborted) {
+          return
+        }
         setHasSetup(true)
       })
     }
diff --git a/src/view/screens/Search.tsx b/src/view/screens/Search.tsx
index 82586e829..385489c4b 100644
--- a/src/view/screens/Search.tsx
+++ b/src/view/screens/Search.tsx
@@ -33,7 +33,7 @@ export const Search = ({navIdx, visible, params}: ScreenParams) => {
     if (visible) {
       store.shell.setMinimalShellMode(false)
       autocompleteView.setup()
-      store.nav.setTitle(navIdx, `Search`)
+      store.nav.setTitle(navIdx, 'Search')
     }
   }, [store, visible, name])