From 8de9572c0afeac2e36a17b468317c189015eb50c Mon Sep 17 00:00:00 2001 From: plebbitor Date: Wed, 19 Apr 2023 14:12:06 +0200 Subject: [PATCH] added preload for all assets --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 67a46951..d13483b7 100644 --- a/src/App.js +++ b/src/App.js @@ -67,7 +67,7 @@ export default function App() { // preload banners useEffect(() => { const loadImages = async () => { - const images = await importAll(require.context('../public/assets/banners', false, /\.(png|jpe?g|svg)$/)); + const images = await importAll(require.context('../public/assets', true, /\.(png|jpe?g|svg)$/)); const imageUrls = images.map((image) => image.default); preloadImages(imageUrls); };