Skip to content

Commit

Permalink
basic grid
Browse files Browse the repository at this point in the history
  • Loading branch information
ann-kilzer committed Jul 4, 2024
1 parent 22d00cf commit 941f374
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 4 deletions.
26 changes: 22 additions & 4 deletions src/routes/Team/Team.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
import { FC } from 'react'
import { FC, ReactNode } from 'react'
import Container from '@mui/material/Container'
import Typography from '@mui/material/Typography';
import { useTranslation } from 'react-i18next';
import Grid from '@mui/material/Grid'
import Stack from '@mui/material/Stack'
import Typography from '@mui/material/Typography'
import { useTranslation } from 'react-i18next'
import TeamMember from '@/types/TeamMember'
import TeamMemberCard from './TeamMemberCard'
import team from './team.json'


const Team: FC = () => {
const { t } = useTranslation();

const teamGrid: ReactNode[] = []
team.forEach((member: TeamMember) => {
teamGrid.push(<Grid item>
<TeamMemberCard member={member} />
</Grid>)
})

return <Container style={{ padding: 32 }}>
<Typography variant="h1">{t('team.title')}</Typography>
<Stack spacing={2}>
<Typography variant="h1">{t('team.title')}</Typography>
<Grid container spacing={2}>
{teamGrid}
</Grid>
</Stack>
</Container>
}

Expand Down
16 changes: 16 additions & 0 deletions src/routes/Team/TeamMemberCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { FC } from 'react'
import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import TeamMember from '@/types/TeamMember';

interface TeamMemberCardProps {
member: TeamMember
}

const TeamMemberCard: FC<TeamMemberCardProps> = ({ member }) => {
return <Card>
<CardContent>{member.nameEN}</CardContent>
</Card>
}

export default TeamMemberCard
44 changes: 44 additions & 0 deletions src/routes/Team/team.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[
{
"nameEN": "Ann Kilzer",
"nameJA": "キルザー·杏",
"titleEN": "Director",
"image": "todo"
},
{
"nameEN": "Paty Cortez",
"nameJA": "",
"titleEN": "",
"image": "todo"
},
{
"nameEN": "Maria Tenorio",
"nameJA": "",
"titleEN": "",
"image": "todo"
},
{
"nameEN": "Krizza Bullecer",
"nameJA": "",
"titleEN": "",
"image": "todo"
},
{
"nameEN": "Daria Vazhenina",
"nameJA": "",
"titleEN": "",
"image": "todo"
},
{
"nameEN": "Anna Nakayama",
"nameJA": "",
"titleEN": "",
"image": "todo"
},
{
"nameEN": "Aidan Fournier",
"nameJA": "",
"titleEN": "",
"image": "todo"
}
]
9 changes: 9 additions & 0 deletions src/types/TeamMember.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type TeamMember = {
nameEN: string
nameJA?: string
titleEN: string
titleJA?: string
image: string
}

export default TeamMember

0 comments on commit 941f374

Please sign in to comment.