From 2435b961d88164e76fe030a9ce2a4497a8e3e196 Mon Sep 17 00:00:00 2001 From: Filip Czaplicki Date: Tue, 13 Feb 2024 00:33:15 +0100 Subject: [PATCH] Use absolute urls to assets --- src/3rdparty/reactStoreBadges.tsx | 4 ++-- src/components/map_style.ts | 2 +- src/components/navbar.tsx | 4 ++-- src/components/partnersModal.tsx | 2 +- src/components/sidebar/defibrillatorDetails.tsx | 2 +- src/components/sidebar/defibrillatorEditor.tsx | 2 +- src/components/sidebar/photoReporter.tsx | 2 +- src/components/sidebar/photoUploader.tsx | 2 +- src/i18n.ts | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/3rdparty/reactStoreBadges.tsx b/src/3rdparty/reactStoreBadges.tsx index 3c90bd3..9235bb7 100644 --- a/src/3rdparty/reactStoreBadges.tsx +++ b/src/3rdparty/reactStoreBadges.tsx @@ -5,10 +5,10 @@ import React, { FC, useLayoutEffect, useState } from "react"; const HEIGHT_RATIO = 3.375; export const googlePlayPath = (language: string) => - `img/google-play/${language}.svg`; + `/img/google-play/${language}.svg`; export const appStorePath = (language: string) => - `img/play-store/${language}.svg`; + `/img/play-store/${language}.svg`; const badgePath = (platform: "ios" | "android", language: string): string => platform === "android" ? googlePlayPath(language) : appStorePath(language); diff --git a/src/components/map_style.ts b/src/components/map_style.ts index 6500262..0550d79 100644 --- a/src/components/map_style.ts +++ b/src/components/map_style.ts @@ -4,7 +4,7 @@ import { Country } from "~/model/country"; const getUrl = window.location; const baseUrl = `${getUrl.protocol}//${getUrl.host}${getUrl.pathname}`; -const spriteUrl = new URL("img/sprite", baseUrl).href; +const spriteUrl = new URL("/img/sprite", baseUrl).href; // can't use URL class since this is a template not literal url const tilesUrl = `${backendBaseUrl}/api/v1/tile/{z}/{x}/{y}.mvt`; const TILE_COUNTRIES_MAX_ZOOM = 6; diff --git a/src/components/navbar.tsx b/src/components/navbar.tsx index d0fa9b5..a5f3cea 100644 --- a/src/components/navbar.tsx +++ b/src/components/navbar.tsx @@ -60,7 +60,7 @@ const SiteNavbar: FC = ({ toggleSidebarShown }) => { target="_blank" title="CloudFerro" > - CloudFerro + CloudFerro @@ -153,7 +153,7 @@ const SiteNavbar: FC = ({ toggleSidebarShown }) => { > {t("navbar.hosted_by")}{" "} - CloudFerro + CloudFerro diff --git a/src/components/partnersModal.tsx b/src/components/partnersModal.tsx index a7b61d6..3f7120d 100644 --- a/src/components/partnersModal.tsx +++ b/src/components/partnersModal.tsx @@ -67,7 +67,7 @@ const PartnersModal: FC = () => {
{partner.name}
diff --git a/src/components/sidebar/defibrillatorDetails.tsx b/src/components/sidebar/defibrillatorDetails.tsx index 5def412..030864e 100644 --- a/src/components/sidebar/defibrillatorDetails.tsx +++ b/src/components/sidebar/defibrillatorDetails.tsx @@ -153,7 +153,7 @@ const DefibrillatorDetails: FC = (props) => { = ({ = (props) => { = (props) => {