diff options
author | dan <dan.abramov@gmail.com> | 2024-10-29 20:58:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-29 20:58:38 +0000 |
commit | 339f45ccbb043b9b2f46a459af4dfb368dfb705d (patch) | |
tree | c023f21805427d5fb01366fa077f4cf7a73d5a8e /src/view/com/profile/ProfileSubpageHeader.tsx | |
parent | 1cfcffd79eb8298e628c9bb9b71570e1b1269c6a (diff) | |
download | voidsky-339f45ccbb043b9b2f46a459af4dfb368dfb705d.tar.zst |
Refactor lightbox model to plain object (#5999)
* Refactor lightbox model to plain object * Rename name to type
Diffstat (limited to 'src/view/com/profile/ProfileSubpageHeader.tsx')
-rw-r--r-- | src/view/com/profile/ProfileSubpageHeader.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/view/com/profile/ProfileSubpageHeader.tsx b/src/view/com/profile/ProfileSubpageHeader.tsx index d6995749b..6b267c6da 100644 --- a/src/view/com/profile/ProfileSubpageHeader.tsx +++ b/src/view/com/profile/ProfileSubpageHeader.tsx @@ -13,7 +13,7 @@ import {NavigationProp} from '#/lib/routes/types' import {sanitizeHandle} from '#/lib/strings/handles' import {isNative} from '#/platform/detection' import {emitSoftReset} from '#/state/events' -import {ImagesLightbox, useLightboxControls} from '#/state/lightbox' +import {useLightboxControls} from '#/state/lightbox' import {useSetDrawerOpen} from '#/state/shell' import {Menu_Stroke2_Corner0_Rounded as Menu} from '#/components/icons/Menu' import {StarterPack} from '#/components/icons/StarterPack' @@ -70,7 +70,11 @@ export function ProfileSubpageHeader({ if ( avatar // TODO && !(view.moderation.avatar.blur && view.moderation.avatar.noOverride) ) { - openLightbox(new ImagesLightbox([{uri: avatar}], 0)) + openLightbox({ + type: 'images', + images: [{uri: avatar}], + index: 0, + }) } }, [openLightbox, avatar]) |