Skip to content

Commit

Permalink
IIIF needs to be client only
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Aug 1, 2024
1 parent 63f77c4 commit 93ba5ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/components/figures/FigureModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import ChevronUp from "../icons/ChevronUp";
import IIIFViewer from "./IIIFViewer.client";
import type { TFigure } from "~/types/figureType";
import type { ReactNode } from "react";
import { ClientOnly } from "remix-utils/client-only";

interface Props {
figure: TFigure;
Expand Down Expand Up @@ -113,7 +114,9 @@ export default function FigureModal({
</Button>
</DialogTitle>
<div className="flex flex-col justify-between">
<IIIFViewer figure={figure} />
<ClientOnly>
{() => <IIIFViewer figure={figure} />}
</ClientOnly>
<Caption figure={figure} className="md:mb-2" />
<div className="mx-auto w-full rounded-2xl bg-white p-2">
<Disclosure>
Expand Down

0 comments on commit 93ba5ec

Please sign in to comment.