main
Midnight 3 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 Footer from '../components/footer';
const cache = {};
// const cache = {};
function importAll(r) {
r.keys().forEach((key) => (cache[key] = r(key)));
}
// Note from the docs -> Warning: The arguments passed to require.context must be literals!
importAll(require.context("../public/gallery", false, /\.(png|jpe?g|svg)$/));
// function importAll(r) {
// r.keys().forEach((key) => (cache[key] = r(key)));
// }
// // Note from the docs -> Warning: The arguments passed to require.context must be literals!
// 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() {

Loading…
Cancel
Save