diff --git a/frontend/src/root.tsx b/frontend/src/root.tsx index d1aafa8..14add54 100644 --- a/frontend/src/root.tsx +++ b/frontend/src/root.tsx @@ -16,6 +16,8 @@ import { import "./root.css"; +export const DENNIS = "https://dennis.doordesk.net"; + export default function Root() { const location = useLocation(); diff --git a/frontend/src/routes/blog.tsx b/frontend/src/routes/blog.tsx index 0f5de1e..25f8efd 100644 --- a/frontend/src/routes/blog.tsx +++ b/frontend/src/routes/blog.tsx @@ -5,10 +5,11 @@ import Slingshot from "~/components/Slingshot"; import type { JSXElement } from "solid-js"; import type { Ammo } from "~/components/Slingshot"; +import { DENNIS } from "~/root"; export function routeData() { const [ammoBox] = createResource(async () => { - const response = await fetch("http://127.0.0.1:9696/dennis/blog"); + const response = await fetch(`${DENNIS}/blog`); return await response.json() as Ammo[]; }); diff --git a/frontend/src/routes/index.tsx b/frontend/src/routes/index.tsx index f058ec5..247f288 100644 --- a/frontend/src/routes/index.tsx +++ b/frontend/src/routes/index.tsx @@ -5,10 +5,12 @@ import Slingshot from "~/components/Slingshot"; import type { JSXElement } from "solid-js"; import type { Ammo } from "~/components/Slingshot"; +import { DENNIS } from "~/root"; + export function routeData() { const [ammoBox] = createResource(async () => { - const response = await fetch("http://127.0.0.1:9696/dennis/home"); + const response = await fetch(`${DENNIS}/home`); return await response.json() as Ammo[]; }); diff --git a/frontend/src/routes/projects.tsx b/frontend/src/routes/projects.tsx index 4fcdacd..008fb6f 100644 --- a/frontend/src/routes/projects.tsx +++ b/frontend/src/routes/projects.tsx @@ -5,10 +5,12 @@ import Slingshot from "~/components/Slingshot"; import type { JSXElement } from "solid-js"; import type { Ammo } from "~/components/Slingshot"; +import { DENNIS } from "~/root"; + export function routeData() { const [ammoBox] = createResource(async () => { - const response = await fetch("http://127.0.0.1:9696/dennis/projects"); + const response = await fetch(`${DENNIS}/projects`); return await response.json() as Ammo[]; });