Skip to content

Commit

Permalink
chore: common-util/useFetchApi.js
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Miller <[email protected]>
  • Loading branch information
atepem and truemiller authored Nov 29, 2024
1 parent 0dea143 commit a196d5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common-util/useFetchApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export const useFetchVideos = (limit = 1000) => {
const imageFilename = thumbnailUrl
? `${process.env.NEXT_PUBLIC_API_URL}${thumbnailUrl}`
: '';
const video_url = `${process.env.NEXT_PUBLIC_API_URL}${get(videoUploaded, 'data[0].attributes.url') || ''}`;

const videoUploadedUrl = get(videoUploaded, 'data[0].attributes.url');
const video_url = videoUploadedUrl ? `${process.env.NEXT_PUBLIC_API_URL}${videoUploadedUrl} : ''`;

return {
id,
Expand Down

0 comments on commit a196d5b

Please sign in to comment.