generated from UoaWDCC/react-template
-
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 branch 'main' into feat/emailJS
- Loading branch information
Showing
8 changed files
with
63 additions
and
130 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,3 +1,3 @@ | ||
node_modules | ||
# Keep environment variables out of version control | ||
.env | ||
.env |
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 |
---|---|---|
|
@@ -33,4 +33,4 @@ yarn-error.log* | |
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
next-env.d.ts |
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,5 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
|
||
export default nextConfig; | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
}; | ||
|
||
export default nextConfig; |
Binary file not shown.
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,8 +1,8 @@ | ||
export default function App() { | ||
|
||
return ( | ||
<> | ||
</> | ||
|
||
); | ||
} | ||
export default function App() { | ||
|
||
return ( | ||
<> | ||
</> | ||
|
||
); | ||
} |
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
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,26 +1,27 @@ | ||
import styles from "./PastEvents.module.css"; | ||
import EventCard from "./EventCard" | ||
|
||
export default function PastEvents() { | ||
const pastEvents = [ | ||
{eventName: "Event 1", eventDescription: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eia pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", imgUrl: "https://fastly.4sqi.net/img/general/200x200/32264433_4nGcfHNabq9lyah9S3b1PlpX_6p0qENU25inJ93SWZ4.jpg"}, | ||
{eventName: "Event 2", eventDescription: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eia pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", imgUrl: "https://upload.wikimedia.org/wikipedia/commons/thumb/9/92/Backyardpool.jpg/1200px-Backyardpool.jpg"}, | ||
{eventName: "Event 3", eventDescription: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eia pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", imgUrl: "https://spothopper-static.s3.us-east-1.amazonaws.com/web/daviebilliardclub--com/custom/fb_image.jpg"} | ||
] | ||
return ( | ||
<div className={styles.container}> | ||
<h1 className={styles.title}> | ||
Past Events | ||
</h1> | ||
<div className={styles.content}> | ||
{pastEvents.map((event) => ( | ||
<EventCard key={event.eventName} event={event} /> | ||
))} | ||
</div> | ||
<button className={styles.button}> | ||
View All Events | ||
</button> | ||
</div> | ||
|
||
); | ||
import styles from "./PastEvents.module.css"; | ||
import EventCard from "./EventCard" | ||
|
||
export default function PastEvents() { | ||
const pastEvents = [ | ||
{eventName: "Event 1", eventDescription: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eia pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", imgUrl: "https://fastly.4sqi.net/img/general/200x200/32264433_4nGcfHNabq9lyah9S3b1PlpX_6p0qENU25inJ93SWZ4.jpg"}, | ||
{eventName: "Event 2", eventDescription: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eia pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", imgUrl: "https://upload.wikimedia.org/wikipedia/commons/thumb/9/92/Backyardpool.jpg/1200px-Backyardpool.jpg"}, | ||
{eventName: "Event 3", eventDescription: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eia pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", imgUrl: "https://spothopper-static.s3.us-east-1.amazonaws.com/web/daviebilliardclub--com/custom/fb_image.jpg"} | ||
] | ||
|
||
return ( | ||
<div className={styles.container}> | ||
<h1 className={styles.title}> | ||
Past Events | ||
</h1> | ||
<div className={styles.content}> | ||
{pastEvents.map((event) => ( | ||
<EventCard key={event.eventName} event={event} /> | ||
))} | ||
</div> | ||
<button className={styles.button}> | ||
View All Events | ||
</button> | ||
</div> | ||
|
||
); | ||
} |
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,40 +1,10 @@ | ||
'use client' | ||
import { useRouter, useSearchParams, usePathname } from 'next/navigation' | ||
import { MouseEventHandler } from "react"; | ||
import styles from "./TestButton.module.css"; | ||
|
||
type Params = { | ||
key: string, | ||
value: string, | ||
} | ||
|
||
export default function TestButton() { | ||
const searchParams = useSearchParams() | ||
const pathname = usePathname() | ||
const {replace} = useRouter() | ||
const showModal = searchParams.get('showModal') | ||
|
||
function updateSearchParams({key, value}: Params) { | ||
const params = new URLSearchParams(searchParams) | ||
if (value) { | ||
params.set(key, value) | ||
} else { | ||
params.delete(key) | ||
} | ||
const newUrl = `${pathname}?${params.toString()}` | ||
replace(newUrl) | ||
} | ||
|
||
function handleClick() { | ||
if (showModal === 'y') { | ||
updateSearchParams({key: "showModal", value: "n"}) | ||
} else { | ||
updateSearchParams({key: "showModal", value: "y"}) | ||
} | ||
} | ||
|
||
return ( | ||
<div className={styles.button}> | ||
<button onClick={handleClick}>Toggle Modal</button> | ||
</div> | ||
); | ||
export default function TestButton({ handleClick }: {handleClick: MouseEventHandler<HTMLButtonElement>;}) { | ||
return ( | ||
<div className={styles.button}> | ||
<button onClick={handleClick}>Toggle Modal</button> | ||
</div> | ||
); | ||
} |