diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-08-14 01:12:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-14 01:12:31 +0300 |
commit | b2c56cbd6dfa9af576f947dd41a0d33376b184d1 (patch) | |
tree | acdf57b6e7e2860c89b20b1dc239fe20521cb1c4 /src/state/lightbox.tsx | |
parent | 275fece3e3de0bd09377a33813bcfe35e352874b (diff) | |
download | voidsky-b2c56cbd6dfa9af576f947dd41a0d33376b184d1.tar.zst |
Add displayName to contexts (#8814)
Diffstat (limited to 'src/state/lightbox.tsx')
-rw-r--r-- | src/state/lightbox.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/state/lightbox.tsx b/src/state/lightbox.tsx index 3e01d7ef7..78145d5d7 100644 --- a/src/state/lightbox.tsx +++ b/src/state/lightbox.tsx @@ -2,7 +2,7 @@ import React from 'react' import {nanoid} from 'nanoid/non-secure' import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' -import {ImageSource} from '#/view/com/lightbox/ImageViewing/@types' +import {type ImageSource} from '#/view/com/lightbox/ImageViewing/@types' export type Lightbox = { id: string @@ -15,6 +15,7 @@ const LightboxContext = React.createContext<{ }>({ activeLightbox: null, }) +LightboxContext.displayName = 'LightboxContext' const LightboxControlContext = React.createContext<{ openLightbox: (lightbox: Omit<Lightbox, 'id'>) => void @@ -23,6 +24,7 @@ const LightboxControlContext = React.createContext<{ openLightbox: () => {}, closeLightbox: () => false, }) +LightboxControlContext.displayName = 'LightboxControlContext' export function Provider({children}: React.PropsWithChildren<{}>) { const [activeLightbox, setActiveLightbox] = React.useState<Lightbox | null>( |