diff --git a/frontend/vendor/lightbox.ts b/frontend/vendor/lightbox.ts index 2faa9a703a..70c5013e32 100644 --- a/frontend/vendor/lightbox.ts +++ b/frontend/vendor/lightbox.ts @@ -1,6 +1,5 @@ import Lightbox from "~/components/Common/Lightbox.vue"; -import {Directive, InjectionKey, provide, ShallowRef} from "vue"; -import injectRequired from "~/functions/injectRequired.ts"; +import {Directive, inject, InjectionKey, provide, ShallowRef} from "vue"; export type LightboxTemplateRef = InstanceType; type LightboxTemplateRefFull = Readonly>; @@ -12,7 +11,7 @@ export function useProvideLightbox(lightboxRef: LightboxTemplateRefFull): void { } export function useLightbox() { - const lightbox: LightboxTemplateRefFull = injectRequired(provideKey); + const lightbox: LightboxTemplateRefFull = inject(provideKey); const vLightbox: Directive = (el: HTMLElement): void => { el.addEventListener('click', (e: MouseEvent): void => {