your personal website on atproto - mirror
blento.app
1// Global state for fullscreen image viewer
2let openFn: ((src: string) => void) | null = null;
3
4export function registerImageViewer(fn: (src: string) => void) {
5 openFn = fn;
6}
7
8export function unregisterImageViewer() {
9 openFn = null;
10}
11
12export function openImageViewer(src: string) {
13 openFn?.(src);
14}