-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { useTheme } from "@mui/material" | ||
import { type FC } from "react" | ||
|
||
import * as page from "codeforlife/components/page" | ||
import { useLocation } from "codeforlife/hooks" | ||
Check failure on line 5 in src/pages/home/Home.tsx GitHub Actions / main / test / test-js-code
|
||
|
||
import AboutUs from "./AboutUs" | ||
import CodingClubs from "./CodingClubs" | ||
import Quotes from "./Quotes" | ||
import TargetAudience from "./TargetAudience" | ||
|
||
const Home: FC = () => { | ||
const theme = useTheme() | ||
const { state } = useLocation<{ signUpSuccess: boolean }>() | ||
|
||
return ( | ||
<page.Page> | ||
{state?.signUpSuccess !== undefined && ( | ||
<page.Notification error={!state.signUpSuccess}> | ||
{state.signUpSuccess | ||
? "Thank you for signing up! 🎉" | ||
: "Invalid email address. Please try again."} | ||
</page.Notification> | ||
)} | ||
{/* Special case: un-contained page section */} | ||
<TargetAudience /> | ||
<page.Section> | ||
<AboutUs /> | ||
</page.Section> | ||
<page.Section boxProps={{ bgcolor: theme.palette.info.main }}> | ||
Check failure on line 30 in src/pages/home/Home.tsx GitHub Actions / main / test / test-js-code
|
||
<Quotes /> | ||
</page.Section> | ||
<page.Section> | ||
<CodingClubs /> | ||
</page.Section> | ||
</page.Page> | ||
) | ||
} | ||
|
||
export default Home |