about summary refs log tree commit diff
path: root/src/screens/Profile/Header/Shell.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-11-04 21:31:21 +0000
committerGitHub <noreply@github.com>2024-11-04 21:31:21 +0000
commit26c48373e29643ca7a3248315506131d53d05b8b (patch)
tree7931136c51cf779cad1a94cce28af78cc7cb0c6e /src/screens/Profile/Header/Shell.tsx
parent174988bc5ab00774d200a882312985f55d903d81 (diff)
downloadvoidsky-26c48373e29643ca7a3248315506131d53d05b8b.tar.zst
Refactor lightbox prop drilling (#6073)
* Refactor lightbox footer to render prop

* Unify lightbox types

* Unindent

* Refactor LightboxFooter props

* Move LightboxFooter into the implementation file
Diffstat (limited to 'src/screens/Profile/Header/Shell.tsx')
-rw-r--r--src/screens/Profile/Header/Shell.tsx14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/screens/Profile/Header/Shell.tsx b/src/screens/Profile/Header/Shell.tsx
index 26e940688..925066d72 100644
--- a/src/screens/Profile/Header/Shell.tsx
+++ b/src/screens/Profile/Header/Shell.tsx
@@ -55,8 +55,18 @@ let ProfileHeaderShell = ({
     const modui = moderation.ui('avatar')
     if (profile.avatar && !(modui.blur && modui.noOverride)) {
       openLightbox({
-        type: 'profile-image',
-        profile: profile,
+        images: [
+          {
+            uri: profile.avatar,
+            thumbUri: profile.avatar,
+            dimensions: {
+              // It's fine if it's actually smaller but we know it's 1:1.
+              height: 1000,
+              width: 1000,
+            },
+          },
+        ],
+        index: 0,
         thumbDims: null,
       })
     }