From 7a3626df1c32c7120648ac8eb9732e3a4a57abec Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Mon, 25 Oct 2021 12:45:13 +0200 Subject: [PATCH] fixing unsplash cors issue --- src/utils/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/index.js b/src/utils/index.js index 65f8a0e21..c2f66a95b 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -70,7 +70,7 @@ export const unsplashPhotoRequestUrl = 'https://source.unsplash.com/featured/400x600'; export const getUnsplashPhoto = async () => { - const response = await fetch(unsplashPhotoRequestUrl); + const response = await fetch(unsplashPhotoRequestUrl, { mode: 'no-cors' }); return response.url; };