Skip to content

Commit

Permalink
Add configurable image source
Browse files Browse the repository at this point in the history
  • Loading branch information
neilh-cogapp committed Mar 21, 2024
1 parent 0dcad40 commit 82c972a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ const searchClient = algoliasearch(
process.env.NEXT_PUBLIC_ALGOLIA_API_KEY ?? ''
);

const imageRoot = process.env.NEXT_PUBLIC_IMAGE_SRC || 'cutouts';

function Hit({ hit, onImageDragStart, onInfoButtonClick, onAddButtonClick }) {
const { objectID, title, classification, attribution } = hit;
let cutoutPath = `/cutouts/resized/trimmed/${objectID}.png`;
let cutoutPath = `${imageRoot}/${objectID}.png`;

return (
<div className="flex gap-x-4 my-4 p-4 w-full rounded-sm border-vibrancy-blue border shadow">
Expand Down

0 comments on commit 82c972a

Please sign in to comment.