From 42b1c36388691a7641cb8f7b0fc5e16e9a8bafb2 Mon Sep 17 00:00:00 2001 From: Oluwatobi Sofela Date: Thu, 27 Aug 2026 06:21:19 +0100 Subject: [PATCH] fix: Add file extension to imports This fixes the ERR_MODULE_NOT_FOUND production error --- src/ImageGallery.test.tsx | 2 +- src/ImageGallery.tsx | 2 +- src/lightbox/Caption.tsx | 2 +- src/lightbox/CarouselTrack.tsx | 6 +++--- src/lightbox/Lightbox.tsx | 10 +++++----- src/lightbox/Navigation.tsx | 2 +- src/lightbox/ThumbnailStrip.tsx | 2 +- src/lightbox/Toolbar.tsx | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/ImageGallery.test.tsx b/src/ImageGallery.test.tsx index 3c03bef..844f086 100644 --- a/src/ImageGallery.test.tsx +++ b/src/ImageGallery.test.tsx @@ -1,6 +1,6 @@ import { expect, test, beforeAll, jest } from "@jest/globals"; import { fireEvent, render, screen } from "@testing-library/react"; -import { ImageGallery } from "./ImageGallery"; +import { ImageGallery } from "./ImageGallery.tsx"; beforeAll(() => { // JSDOM doesn't implement showModal/close, so we polyfill them. diff --git a/src/ImageGallery.tsx b/src/ImageGallery.tsx index d7694c6..e225106 100644 --- a/src/ImageGallery.tsx +++ b/src/ImageGallery.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { updateCaptionOpacity } from "./helpers.ts"; -import { ImageDataType } from "./ImageGallery.types"; +import { ImageDataType } from "./ImageGallery.types.tsx"; import { Lightbox } from "./lightbox/Lightbox.tsx"; interface ImageGalleryPropsType { diff --git a/src/lightbox/Caption.tsx b/src/lightbox/Caption.tsx index 0f7fe12..0fd6308 100644 --- a/src/lightbox/Caption.tsx +++ b/src/lightbox/Caption.tsx @@ -1,4 +1,4 @@ -import { ImageDataType } from "../ImageGallery.types"; +import { ImageDataType } from "../ImageGallery.types.tsx"; interface CaptionProps { fixedCaption?: boolean; diff --git a/src/lightbox/CarouselTrack.tsx b/src/lightbox/CarouselTrack.tsx index 2f4e7ac..99aeb48 100644 --- a/src/lightbox/CarouselTrack.tsx +++ b/src/lightbox/CarouselTrack.tsx @@ -5,9 +5,9 @@ import { useRef, useState, } from "react"; -import { Caption } from "./Caption"; -import { useCarouselGesture } from "../hooks/useCarouselGesture"; -import { ImageDataType } from "../ImageGallery.types"; +import { Caption } from "./Caption.tsx"; +import { useCarouselGesture } from "../hooks/useCarouselGesture.ts"; +import { ImageDataType } from "../ImageGallery.types.tsx"; export interface CarouselTrackRef { goToSlide: (newSlideNumber: number) => void; diff --git a/src/lightbox/Lightbox.tsx b/src/lightbox/Lightbox.tsx index 7128230..108ab42 100644 --- a/src/lightbox/Lightbox.tsx +++ b/src/lightbox/Lightbox.tsx @@ -1,9 +1,9 @@ import { useRef, useEffect, useState } from "react"; -import { CarouselTrack, CarouselTrackRef } from "./CarouselTrack"; -import { Navigation } from "./Navigation"; -import { ThumbnailStrip } from "./ThumbnailStrip"; -import { Toolbar } from "./Toolbar"; -import { ImageDataType } from "../ImageGallery.types"; +import { CarouselTrack, CarouselTrackRef } from "./CarouselTrack.tsx"; +import { Navigation } from "./Navigation.tsx"; +import { ThumbnailStrip } from "./ThumbnailStrip.tsx"; +import { Toolbar } from "./Toolbar.tsx"; +import { ImageDataType } from "../ImageGallery.types.tsx"; interface LightboxProps { exitLightbox: () => void; diff --git a/src/lightbox/Navigation.tsx b/src/lightbox/Navigation.tsx index f80ff07..9042138 100644 --- a/src/lightbox/Navigation.tsx +++ b/src/lightbox/Navigation.tsx @@ -1,4 +1,4 @@ -import { SvgElement } from "../helpers"; +import { SvgElement } from "../helpers.tsx"; interface NavigationProps { changeSlide: (direction: -1 | 1) => void; diff --git a/src/lightbox/ThumbnailStrip.tsx b/src/lightbox/ThumbnailStrip.tsx index 105d9c7..93381cd 100644 --- a/src/lightbox/ThumbnailStrip.tsx +++ b/src/lightbox/ThumbnailStrip.tsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from "react"; -import { ImageDataType } from "../ImageGallery.types"; +import { ImageDataType } from "../ImageGallery.types.tsx"; interface ThumbnailStripProps { goToClickedThumbnail: (index: number) => void; diff --git a/src/lightbox/Toolbar.tsx b/src/lightbox/Toolbar.tsx index 0b86612..5049886 100644 --- a/src/lightbox/Toolbar.tsx +++ b/src/lightbox/Toolbar.tsx @@ -1,4 +1,4 @@ -import { SvgElement } from "../helpers"; +import { SvgElement } from "../helpers.tsx"; interface ToolbarProps { exitFullScreenAndDialog: () => void;