|
|
|
@ -2,28 +2,11 @@ import Head from 'next/head'
|
|
|
|
|
import styles from '../styles/Gallery.module.css'
|
|
|
|
|
import Header from '../components/header';
|
|
|
|
|
import Footer from '../components/footer';
|
|
|
|
|
|
|
|
|
|
// 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)$/));
|
|
|
|
|
|
|
|
|
|
// const images = Object.entries(cache).map(module => module[1].default);
|
|
|
|
|
|
|
|
|
|
// import { google } from 'googleapis';
|
|
|
|
|
// import fs from 'fs';
|
|
|
|
|
// import readline from 'readline';
|
|
|
|
|
|
|
|
|
|
export default function Gallery() {
|
|
|
|
|
// return (
|
|
|
|
|
// <>
|
|
|
|
|
// <p>Media Page..</p>
|
|
|
|
|
|
|
|
|
|
// {images.map(image => (
|
|
|
|
|
// <img style={{width: 100}} src={image} />
|
|
|
|
|
// ))}
|
|
|
|
|
// </>
|
|
|
|
|
// );
|
|
|
|
|
return (
|
|
|
|
|
<div className="page">
|
|
|
|
|
<Head>
|
|
|
|
@ -43,9 +26,34 @@ export default function Gallery() {
|
|
|
|
|
</article>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Footer />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Footer />
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// export async function getServerSideProps() {
|
|
|
|
|
// const auth = new google.auth.GoogleAuth({
|
|
|
|
|
// keyFile: process.env.GOOGLE_APPLICATION_CREDENTIALS,
|
|
|
|
|
// scopes: ['https://www.googleapis.com/auth/spreadsheets.readonly']
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// const sheets = google.sheets({ version: 'v4', auth });
|
|
|
|
|
|
|
|
|
|
// const { id } = 2;
|
|
|
|
|
|
|
|
|
|
// const range = `Gallery!A:${id}:B${id}`;
|
|
|
|
|
|
|
|
|
|
// const response = sheets.spreadsheets.values.get({
|
|
|
|
|
// spreadsheetId: "13V7PXSJ6FSPZakBbYEpi1495T3nWxJ7Loi4EWwOZ7lE",
|
|
|
|
|
// range,
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// const data = await response.json();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return {
|
|
|
|
|
// props: {
|
|
|
|
|
// response: data
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|