about summary refs log tree commit diff
path: root/src/view/com/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/util')
-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
5 files changed, 28 insertions, 11 deletions
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 = []