From 7389ed0b2b3dd8403a86f0ad6154c24e6c4b77fb Mon Sep 17 00:00:00 2001 From: Sean Norwood Date: Tue, 18 Oct 2022 15:08:59 -0500 Subject: [PATCH] Add url for public assets --- app/root.tsx | 2 +- app/routes/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/root.tsx b/app/root.tsx index a9b9e9f..105a354 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -29,7 +29,7 @@ export const meta: MetaFunction = () => ({ export async function loader({ request }: LoaderArgs) { return { ENV: { - API_URL: process.env.API_URL, + PUBLIC_API_URL: process.env.PUBLIC_API_URL, }, }; } diff --git a/app/routes/index.tsx b/app/routes/index.tsx index dea97b4..d1d02c7 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -10,7 +10,7 @@ export const loader: LoaderFunction = async ({ context, request }) => { const { data } = await getVideos(API_KEY); const withVideoThumbs = data.map((d) => ({ ...d, - resolved_thumb_url: `http://localhost:8000${d.vid_thumb_url}`, + resolved_thumb_url: `${process.env.PUBLIC_API_URL}${d.vid_thumb_url}`, })); return withVideoThumbs;