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 #15 from acm-ucr/carlahauu/course-name
Created Course Name Component
- Loading branch information
Showing
8 changed files
with
48 additions
and
0 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 |
---|---|---|
|
@@ -10,6 +10,7 @@ const nextConfig = { | |
}, | ||
basePath: "", | ||
assetPrefix: "", | ||
trailingSlash: true, | ||
}; | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Name from "@/components/course/name"; | ||
import { courses } from "@/courses"; | ||
|
||
interface props { | ||
params: { | ||
name: string; | ||
}; | ||
} | ||
|
||
export const generateStaticParams = () => { | ||
return courses.map(({ param }) => ({ name: param })); | ||
}; | ||
|
||
const Page = ({ params }: props) => { | ||
const { name } = params; | ||
|
||
return ( | ||
<> | ||
<Name>{name}</Name> | ||
</> | ||
); | ||
}; | ||
|
||
export default Page; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const Page = () => { | ||
return <div>Page</div>; | ||
}; | ||
|
||
export default Page; |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
interface CourseNameProps { | ||
children: string; | ||
} | ||
|
||
const Name = ({ children }: CourseNameProps) => { | ||
return ( | ||
<div className="font-Malayalam rounded-2xl bg-devstation-cyan-100 py-4 text-center text-6xl text-white"> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
export default Name; |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export const courses = [ | ||
{ | ||
name: "Introduction to Next.js", | ||
param: "intro-nextjs", | ||
}, | ||
]; |