generated from acm-ucr/acm-ucr-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from acm-ucr/sean/deploy
edit next config
- Loading branch information
Showing
2 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |