forked from SLoh4137/umcp-tase
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathboard23.tsx
81 lines (72 loc) · 2.4 KB
/
board23.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import React from "react"
import { PageProps, graphql } from "gatsby"
import {
Hidden,
Theme,
createStyles,
withStyles,
WithStyles,
} from "@material-ui/core"
import { BoardPageQuery } from "graphql-types"
import SEO from "components/seo"
import useBios23 from "hooks/archivedBoardHooks/useBios23"
import BioGrid from "components/Bios/BioGrid"
import PageContent from "components/PageLayout/PageContent"
import ParallaxBackground from "components/PageLayout/ParallaxBackground"
import Section from "components/PageLayout/Section"
import Text from "components/Typography/Text"
const styles = (theme: Theme) =>
createStyles({
grid: {},
gridItem: {},
})
type Props = WithStyles<typeof styles> &
PageProps & {
data: BoardPageQuery
}
function BoardPage(props: Props) {
const { data, classes } = props
const { boardBackground } = data
if (!boardBackground) throw new Error("Board background does not exist.")
const bios = useBios23()
const presidents = bios.slice(0, 2)
const rest = bios.slice(2)
return (
<>
<SEO title="Board" />
<ParallaxBackground image={boardBackground}>
<Text variant="h3" color="white" align="center" paragraph>
Meet the 2023-2024 Board
</Text>
<Text variant="h6" color="white" align="center">
Check out the people who made it all happen in 2023-2024!
</Text>
</ParallaxBackground>
<PageContent>
<Section maxWidth="lg">
<Hidden xsDown>
<Text
variant="subtitle1"
color="textSecondary"
align="center"
paragraph
>
Tip: Learn more about the board by hovering or
tapping over their picture!
</Text>
</Hidden>
<BioGrid bios={presidents} />
<BioGrid bios={rest} />
</Section>
</PageContent>
</>
)
}
export const query = graphql`
query BoardPage23 {
boardBackground: file(relativePath: { eq: "board2023.JPG" }) {
...BackgroundImage
}
}
`
export default withStyles(styles)(BoardPage)