From 0330439362c5b785958ec32e1a2f5119236e4e8e Mon Sep 17 00:00:00 2001 From: log101 Date: Tue, 6 Aug 2024 13:46:28 +0300 Subject: [PATCH] chore: change site on dev mode --- astro.config.mjs | 4 +++- src/components/Leaflet/icons.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index e4b24c4..1488e07 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,11 +2,13 @@ import { defineConfig } from 'astro/config'; import react from "@astrojs/react"; import tailwind from "@astrojs/tailwind"; +const devMode = import.meta.env.DEV + // https://astro.build/config export default defineConfig({ integrations: [react(), tailwind({ applyBaseStyles: false })], output: "static", - site: "https://konulukonum.log101.dev" + site: devMode ? "http://localhost:4321" : "https://konulukonum.log101.dev" }); diff --git a/src/components/Leaflet/icons.ts b/src/components/Leaflet/icons.ts index a20b16f..af6c137 100644 --- a/src/components/Leaflet/icons.ts +++ b/src/components/Leaflet/icons.ts @@ -1,12 +1,12 @@ import L from "leaflet" var targetLocationIcon = L.icon({ - iconUrl: "https://konulukonum.log101.dev/goal.svg", + iconUrl: "/goal.svg", iconSize: [32, 32], }) var currentLocationIcon = L.icon({ - iconUrl: "https://konulukonum.log101.dev/blue-dot.png", + iconUrl: "/blue-dot.png", iconSize: [32, 32], })