Skip to content

Commit

Permalink
Change image url handling
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchmidt committed May 3, 2024
1 parent e7edfbc commit e5a0a53
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
3 changes: 0 additions & 3 deletions packages/shared/services/getImageUrl.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/tool-finder/src/components/Recommendation.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Heading from "@digitalcheck/shared/components/Heading";
import Image from "@digitalcheck/shared/components/Image";
import RichText from "@digitalcheck/shared/components/RichText";
import { getImageUrl } from "@digitalcheck/shared/services/getImageUrl";
import type { Recommendation } from "models/Result";
import type { Tool } from "models/Tool";
import { getImageUrl } from "services/getImageUrl";

export interface RecommendationProps {
clusterName: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/tool-finder/src/routes/ResultPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import Box from "@digitalcheck/shared/components/Box";
import Container from "@digitalcheck/shared/components/Container";
import FeedbackForm from "@digitalcheck/shared/components/FeedbackForm";
import Image from "@digitalcheck/shared/components/Image";
import { getImageUrl } from "@digitalcheck/shared/services/getImageUrl";
import Recommendation from "components/Recommendation";
import type { Reason } from "models/Reason";
import type { Ressort } from "models/Ressort";
import type { VisualisationObject } from "models/VisualisationObject";
import { findResultByObjectAndRessort } from "persistance/repository";
import { useEffect } from "react";
import { useNavigate } from "react-router-dom";
import { getImageUrl } from "services/getImageUrl";
import { trackButtonClick, trackFeedbackClick } from "services/tracking";
import useTitle from "services/useTitle";
import { PATH_QUIZ } from ".";
Expand Down
3 changes: 3 additions & 0 deletions packages/tool-finder/src/services/getImageUrl.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function getImageUrl(src: string) {
return new URL(`/src/resources/img/${src}`, import.meta.url).href;
}

0 comments on commit e5a0a53

Please sign in to comment.