mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-12-22 01:40:14 +00:00
Add url for public assets
This commit is contained in:
parent
2e213376e3
commit
7389ed0b2b
@ -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,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user