main
Midnight 4 years ago
parent b585a60426
commit fb5458692f

2283
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -3,15 +3,15 @@ import styles from '../styles/Gallery.module.css'
import Header from '../components/header'; import Header from '../components/header';
import Footer from '../components/footer'; import Footer from '../components/footer';
const cache = {}; // const cache = {};
function importAll(r) { // function importAll(r) {
r.keys().forEach((key) => (cache[key] = r(key))); // r.keys().forEach((key) => (cache[key] = r(key)));
} // }
// Note from the docs -> Warning: The arguments passed to require.context must be literals! // // Note from the docs -> Warning: The arguments passed to require.context must be literals!
importAll(require.context("../public/gallery", false, /\.(png|jpe?g|svg)$/)); // importAll(require.context("../public/gallery", false, /\.(png|jpe?g|svg)$/));
const images = Object.entries(cache).map(module => module[1].default); // const images = Object.entries(cache).map(module => module[1].default);
export default function Gallery() { export default function Gallery() {

Loading…
Cancel
Save