about summary refs log tree commit diff
path: root/src/view/com/profile/ProfileHeader.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-01-24 13:00:11 -0600
committerGitHub <noreply@github.com>2023-01-24 13:00:11 -0600
commitf36c9565362b741c58672204fe0c155252affe28 (patch)
tree85d90f3caae2c8f2103ec50346f9274cf8b243c5 /src/view/com/profile/ProfileHeader.tsx
parent3a90114f3afc66cfef70c71c2ee343c29e1f3e8d (diff)
downloadvoidsky-f36c9565362b741c58672204fe0c155252affe28.tar.zst
Resolve all remaining lint issues (#88)
* Rework 'navIdx' variables from number arrays to strings to avoid equality-check failures in react hooks

* Resolve all remaining lint issues

* Fix tests

* Use node v18 in gh action test
Diffstat (limited to 'src/view/com/profile/ProfileHeader.tsx')
-rw-r--r--src/view/com/profile/ProfileHeader.tsx20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx
index c14a5c827..2f98fce2d 100644
--- a/src/view/com/profile/ProfileHeader.tsx
+++ b/src/view/com/profile/ProfileHeader.tsx
@@ -100,22 +100,14 @@ export const ProfileHeader = observer(function ProfileHeader({
         <LoadingPlaceholder width="100%" height={120} />
         <View
           style={[pal.view, {borderColor: pal.colors.background}, styles.avi]}>
-          <LoadingPlaceholder
-            width={80}
-            height={80}
-            style={{borderRadius: 40}}
-          />
+          <LoadingPlaceholder width={80} height={80} style={styles.br40} />
         </View>
         <View style={styles.content}>
           <View style={[styles.buttonsLine]}>
-            <LoadingPlaceholder
-              width={100}
-              height={31}
-              style={{borderRadius: 50}}
-            />
+            <LoadingPlaceholder width={100} height={31} style={styles.br50} />
           </View>
           <View style={styles.displayNameLine}>
-            <Text type="title-xl" style={[pal.text, {lineHeight: 38}]}>
+            <Text type="title-xl" style={[pal.text, styles.title]}>
               {view.displayName || view.handle}
             </Text>
           </View>
@@ -208,7 +200,7 @@ export const ProfileHeader = observer(function ProfileHeader({
           ) : undefined}
         </View>
         <View style={styles.displayNameLine}>
-          <Text type="title-xl" style={[pal.text, {lineHeight: 38}]}>
+          <Text type="title-xl" style={[pal.text, styles.title]}>
             {view.displayName || view.handle}
           </Text>
         </View>
@@ -349,6 +341,7 @@ const styles = StyleSheet.create({
     // paddingLeft: 86,
     // marginBottom: 14,
   },
+  title: {lineHeight: 38},
 
   handleLine: {
     flexDirection: 'row',
@@ -369,4 +362,7 @@ const styles = StyleSheet.create({
     alignItems: 'center',
     marginBottom: 5,
   },
+
+  br40: {borderRadius: 40},
+  br50: {borderRadius: 50},
 })