Skip to content

Commit

Permalink
Merge pull request #76 from acm-ucr/sean/deploy
Browse files Browse the repository at this point in the history
edit next config
  • Loading branch information
seanquiambao authored Jul 16, 2024
2 parents a941504 + 89da7e2 commit 6f4fe17
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
13 changes: 12 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
output: "export",
reactStrictMode: true,
swcMinify: true,
images: {
loader: "akamai",
path: "",
unoptimized: true,
},
basePath: "",
assetPrefix: "",
};

module.exports = nextConfig;
23 changes: 14 additions & 9 deletions src/app/gallery/[type]/page.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
import { notFound } from "next/navigation";
import NotFound from "@/app/not-found";
import Title from "@/components/Title";

export async function generateStaticParams() {
const allPages = ["fall", "winter", "spring", "past"];
return allPages.map((page) => ({ type: page }));
}

const Page = ({ params }) => {
const PAGES = {
fall: "Fall",
winter: "Winter",
spring: "Spring",
past: "Past",
};
if (!PAGES[params.type]) {
return notFound();
if (PAGES.hasOwnProperty(params.type)) {
return (
<div className="text-7xl">
<Title text={PAGES[params.type]} food={"chip"} />
</div>
);
} else {
return <NotFound />;
}

return (
<div className="text-7xl">
<Title text={PAGES[params.type]} food={"chip"} />
</div>
);
};

export default Page;

0 comments on commit 6f4fe17

Please sign in to comment.