diff --git a/client/routes/Home/components/index.js b/client/routes/Home/components/index.js index 9866791..30b36b0 100644 --- a/client/routes/Home/components/index.js +++ b/client/routes/Home/components/index.js @@ -53,6 +53,13 @@ const { API_URL } = process.env; function Home() { const { data, loading } = useData(`${API_URL}/products`, {}, { method: 'GET' }, { ssr: true }); + const getResizedImage = (imageUrl) => { + if (imageUrl) { + return `https://res.cloudinary.com/irfan-maulana-tkpd/image/fetch/c_fill,g_auto:face,h_200,fl_force_strip.progressive/f_webp/${encodeURIComponent(imageUrl)}`; + } + return ''; + }; + return (