diff --git a/src/components/Groups.tsx b/src/components/Groups.tsx index 4cdde20..6657206 100644 --- a/src/components/Groups.tsx +++ b/src/components/Groups.tsx @@ -1,8 +1,34 @@ +import Button from '@material-ui/core/Button'; import React, { useState, useEffect } from 'react'; +import Card from '@material-ui/core/Card'; +import CardActionArea from '@material-ui/core/CardActionArea'; +import CardActions from '@material-ui/core/CardActions'; +import CardContent from '@material-ui/core/CardContent'; +import { makeStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; +import CloudUploadIcon from '@material-ui/icons/CloudUpload'; +import Box from '@material-ui/core/Box'; +const useStyles = makeStyles((theme) => ({ + root: { + maxWidth: 345, + justifyContent: 'center', + }, + media: { + height: 140, + }, + button: { + margin: theme.spacing(1), + background: '#40E0D0', + '&:hover': { + background: '#FFFFFF', + }, + }, +})); const Groups = () => { + const classes = useStyles(); const [state, setState] = useState({ - Groups: [ + MyGroups: [ { id: 1, group_title: 'TJ', @@ -24,39 +50,73 @@ const Groups = () => { callAPI(); }, []); return ( -
+

Groups

- - Create Group - + + +


- {state.Groups.map((group, index) => { + {state.MyGroups.map((group, index) => { + let background; + if (index % 2 === 0) { + background = '#F1EAE8'; + } else { + background = '#FFFFFF'; + } return ( -
-
-

{group.group_title}

- -
-
+ + + + {group.group_title} + + + + + + + + + + ); })}
diff --git a/src/components/MyGroups.tsx b/src/components/MyGroups.tsx index 422261b..de4cfdc 100644 --- a/src/components/MyGroups.tsx +++ b/src/components/MyGroups.tsx @@ -1,6 +1,32 @@ +import Button from '@material-ui/core/Button'; import React, { useState, useEffect } from 'react'; +import Card from '@material-ui/core/Card'; +import CardActionArea from '@material-ui/core/CardActionArea'; +import CardActions from '@material-ui/core/CardActions'; +import CardContent from '@material-ui/core/CardContent'; +import { makeStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; +import CloudUploadIcon from '@material-ui/icons/CloudUpload'; +import Box from '@material-ui/core/Box'; +const useStyles = makeStyles((theme) => ({ + root: { + maxWidth: 345, + justifyContent: 'center', + }, + media: { + height: 140, + }, + button: { + margin: theme.spacing(1), + background: '#40E0D0', + '&:hover': { + background: '#FFFFFF', + }, + }, +})); const MyGroups = () => { + const classes = useStyles(); const [state, setState] = useState({ MyGroups: [ { @@ -24,20 +50,26 @@ const MyGroups = () => { callAPI(); }, []); return ( -
+

My Groups

- - Create Group - + + +


{state.MyGroups.map((group, index) => { @@ -48,14 +80,43 @@ const MyGroups = () => { background = '#FFFFFF'; } return ( - + + + + {group.group_title} + + + + + + + + + + ); })}