Skip to content

Commit

Permalink
home page
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jul 9, 2024
1 parent 0fa5414 commit 89806ff
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/pages/home/Home.tsx
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

View workflow job for this annotation

GitHub Actions / main / test / test-js-code

Module '"codeforlife/hooks"' has no exported member 'useLocation'.

Check failure on line 5 in src/pages/home/Home.tsx

View workflow job for this annotation

GitHub Actions / main / test / test-js-code

Module '"codeforlife/hooks"' has no exported member 'useLocation'.

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

View workflow job for this annotation

GitHub Actions / main / test / test-js-code

Type '{ children: Element; boxProps: { bgcolor: string; }; }' is not assignable to type 'IntrinsicAttributes & SectionProps'.

Check failure on line 30 in src/pages/home/Home.tsx

View workflow job for this annotation

GitHub Actions / main / test / test-js-code

Type '{ children: Element; boxProps: { bgcolor: string; }; }' is not assignable to type 'IntrinsicAttributes & SectionProps'.
<Quotes />
</page.Section>
<page.Section>
<CodingClubs />
</page.Section>
</page.Page>
)
}

export default Home

0 comments on commit 89806ff

Please sign in to comment.