diff --git a/.gitignore b/.gitignore
index 27c8247..bc360d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,5 @@ node_modules/
# TODO: Video Content
*.MOV
*.mp4
+
+.vercel
diff --git a/components/BackHome.js b/components/BackHome.js
index e2e3bfa..4836568 100644
--- a/components/BackHome.js
+++ b/components/BackHome.js
@@ -1,5 +1,5 @@
-import Image from "next/image";
-import { Text, Flex } from "@chakra-ui/react";
+import Link from "next/link";
+import { Button, Text, Flex } from "@chakra-ui/react";
function BackHome() {
return (
diff --git a/pages/index.js b/pages/index.js
index afaff1d..3e65ee2 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -1,14 +1,13 @@
// pages/index.js
import Head from "next/head";
import React, { useState } from "react";
-import { Box, Container, Text, Wrap, WrapItem } from "@chakra-ui/react";
+import { Box, Link, Container, Text, Wrap, WrapItem } from "@chakra-ui/react";
import Image from "next/image";
import { getAllPhotos } from "../lib/utils";
-import Link from "next/link";
import { getPlaiceholder } from "plaiceholder";
export async function getStaticProps() {
- let data = await getAllPhotos().slice(0, 10);
+ let data = await getAllPhotos();
let placeholders = {};
data.forEach((photo) => {
try {
@@ -65,7 +64,7 @@ export default function Home({ data, placeholders }) {
m={3}
bg="white"
lineHeight="0"
- _hover={{ boxShadow: "dark-lg", rounded:"20px" }}
+ _hover={{ boxShadow: "dark-lg", rounded: "20px" }}
>
{/*
*/}
-
+
- {/* {
- // placeholder = base64;
- // console.log("image", photo.id, ":", photo.path);
- // console.log("blurDataURL:", placeholder);
+ // placeholder = base64;
+ // console.log("image", photo.id, ":", photo.path);
+ // console.log("blurDataURL:", placeholder);
// });
// Fix dimensions if really big picture
@@ -50,17 +51,22 @@ export async function getStaticProps({ params }) {
photo.dimensions.height /= 2;
console.log("Resized: ", photo.dimensions.width, photo.dimensions.height);
- // Fix dimensions if really big picture
- console.log("Pic dims: ", photo.dimensions.width, photo.dimensions.height);
- if (photo.dimensions.widths > 1000 || photo.dimensions.heigth > 1000) {
- photo.dimensions.width /= 2;
- photo.dimensions.height = 2;
- console.log("Resized:", photo.dimensions.width, photo.dimensions.height);
- }
- if (photo.dimensions.width > 1000 || photo.dimensions.heigth > 1000) {
- photo.dimensions.width /= 2;
- photo.dimensions.height /= 2;
- console.log("Resized 2:", photo.dimensions.width, photo.dimensions.height);
+ // Fix dimensions if really big picture
+ console.log("Pic dims: ", photo.dimensions.width, photo.dimensions.height);
+ if (photo.dimensions.widths > 1000 || photo.dimensions.heigth > 1000) {
+ photo.dimensions.width /= 2;
+ photo.dimensions.height = 2;
+ console.log("Resized:", photo.dimensions.width, photo.dimensions.height);
+ }
+ if (photo.dimensions.width > 1000 || photo.dimensions.heigth > 1000) {
+ photo.dimensions.width /= 2;
+ photo.dimensions.height /= 2;
+ console.log(
+ "Resized 2:",
+ photo.dimensions.width,
+ photo.dimensions.height
+ );
+ }
}
return {
props: {