From a3e58fecd63832a369a1729bc1ea2d78135af07b Mon Sep 17 00:00:00 2001 From: Max Schmidt Date: Fri, 19 May 2023 08:05:10 +0200 Subject: [PATCH] asdf Signed-off-by: Max Schmidt --- astro/src/components/Content.astro | 3 ++- astro/src/utils/payload.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/astro/src/components/Content.astro b/astro/src/components/Content.astro index d54e1a5..14b3f46 100644 --- a/astro/src/components/Content.astro +++ b/astro/src/components/Content.astro @@ -1,6 +1,7 @@ --- import { Image } from "@astrojs/image/components"; import { getContentArray } from "../utils/helpers"; +import { getImageSrc } from "../utils/payload"; const { content } = Astro.props; const contentArray = getContentArray(content); --- @@ -13,7 +14,7 @@ const contentArray = getContentArray(content); } else { return ( export const getPost = async (id: string) => (await (await fetch(`${url}/api/posts/${id}`)).json()) as Post; + +export const getImageSrc = (src: string) => `${url}/media/${src}}`;