diff --git a/Containers/group-list.js b/Containers/group-list.js index 13e6df1..bfc11ec 100644 --- a/Containers/group-list.js +++ b/Containers/group-list.js @@ -1,4 +1,3 @@ -import { Fragment } from 'react'; import { makeStyles } from '@material-ui/core/styles'; import GroupCard from '../components/Goups/group-card'; diff --git a/Containers/group.js b/Containers/group.js index 4c6fc00..5bcfeeb 100644 --- a/Containers/group.js +++ b/Containers/group.js @@ -16,9 +16,8 @@ const useStyles = makeStyles((theme) => ({ }, })); -const Group = ({id}) => { +const Group = ({group}) => { const classes = useStyles(); - const group = getGroupById(id) return (
diff --git a/components/Goups/group-head.js b/components/Goups/group-head.js index 30ff4f5..be23f1f 100644 --- a/components/Goups/group-head.js +++ b/components/Goups/group-head.js @@ -1,10 +1,12 @@ import React from 'react'; import Link from 'next/link'; +import Button from '../UI/Button' import CardHeader from '@material-ui/core/CardHeader'; import IconButton from '@material-ui/core/IconButton'; import MoreVertIcon from '@material-ui/icons/MoreVert'; const GroupHead = (props) => { + const explore = `groups/${props._id}` return ( { } - title={ - - {props.name} - - } + title={props.name} /> + ); }; diff --git a/components/MUI/theme.js b/components/MUI/theme.js index 4a0f51d..dbb37a4 100644 --- a/components/MUI/theme.js +++ b/components/MUI/theme.js @@ -12,7 +12,7 @@ const theme = createMuiTheme({ dark : '#005662', }, secondary : { - main : '#19857b', + main : '#368ff5', }, error : { main : '#913029', diff --git a/components/UI/Button.js b/components/UI/Button.js new file mode 100644 index 0000000..ca7a761 --- /dev/null +++ b/components/UI/Button.js @@ -0,0 +1,28 @@ +import {default as MuiButton} from '@material-ui/core/Button'; +import { makeStyles } from '@material-ui/core/styles'; +import Link from 'next/link' + +const useStyles = makeStyles((theme) => ({ + btn: { + textDecoration: 'none', + fontSize: '30px', + }, +})); + +const Button = (props) => { + const classes = useStyles() + if (props.link) { + return ( + + {props.children} + + ); + } + + return ( + + {props.children} + + ); +}; +export default Button; diff --git a/components/UI/LogoLink.js b/components/UI/LogoLink.js index 5cfcd10..eab8d3a 100644 --- a/components/UI/LogoLink.js +++ b/components/UI/LogoLink.js @@ -1,21 +1,32 @@ -import React from 'react' -import Link from 'next/link' -import Image from 'next/image' -import {makeStyles} from '@material-ui/core/styles' +import React from 'react'; +import Link from 'next/link'; +import Image from 'next/image'; +import { makeStyles } from '@material-ui/core/styles'; const useStyles = makeStyles((theme) => ({ - img: { - cursor: 'pointer', - } -})) + img: { + cursor: 'pointer', + marginTop: theme.spacing(1), + marginLeft: theme.spacing(40), + marginRight: theme.spacing(5) + }, +})); const LogoLink = () => { - const classess = useStyles() - return ( - - - - ) -} + const classess = useStyles(); + return ( + + + {'Home'} + + + ); +}; -export default LogoLink +export default LogoLink; diff --git a/components/UI/NavTab.js b/components/UI/NavTab.js index bdbad2f..7e0108d 100644 --- a/components/UI/NavTab.js +++ b/components/UI/NavTab.js @@ -6,9 +6,11 @@ import Smooth from './Smooth'; import Link from 'next/link'; const useStyles = makeStyles((theme) => ({ - tab : { - color : theme.palette.primary, - height : 70, + tab: { + color: theme.palette.primary.light, + fontSize: 20, + height: 70, + }, })); @@ -19,14 +21,18 @@ const NavTab = (props) => { return ( - - - + + + + + ); diff --git a/components/UI/Smooth.js b/components/UI/Smooth.js index 1447a39..6c2934d 100644 --- a/components/UI/Smooth.js +++ b/components/UI/Smooth.js @@ -2,8 +2,9 @@ import { makeStyles } from '@material-ui/core/styles'; const useStyles = makeStyles((theme) => ({ active : { - backgroundColor : theme.palette.primary.dark, - height : '2px', + backgroundColor : 'grey', + height : '3px', + textDecoration: 'none', }, inactive : { backgroundColor : 'transparent', @@ -17,7 +18,7 @@ const Smooth = (props) => { return (
{children} -
  • diff --git a/components/UI/progress.js b/components/UI/progress.js new file mode 100644 index 0000000..dd76b6b --- /dev/null +++ b/components/UI/progress.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { makeStyles } from '@material-ui/core/styles'; +import LinearProgress from '@material-ui/core/LinearProgress'; + +const useStyles = makeStyles((theme) => ({ + root: { + width: '100%', + height: '10px', + '& > * + *': { + height: 10, + }, + }, +})); + +const Progress = () => { + const classes = useStyles() + return ( +
    + +
    + ); +} + +export default Progress \ No newline at end of file diff --git a/components/layout/NavBar.js b/components/layout/NavBar.js index 43bfab0..b74c82c 100644 --- a/components/layout/NavBar.js +++ b/components/layout/NavBar.js @@ -9,13 +9,11 @@ const useStyles = makeStyles((theme) => ({ main: { backgroundColor: theme.palette.primary.dark, display: 'flex', - flexDirection: 'column', position: 'fixed', }, tabs: { flex: 1, bottom: 0, - paddingLeft: theme.spacing(0), }, div:{ marginBottom: theme.spacing(9) @@ -28,7 +26,6 @@ const NavBar = () => { - diff --git a/pages/groups/[id].js b/pages/groups/[id].js index 6b31369..7489381 100644 --- a/pages/groups/[id].js +++ b/pages/groups/[id].js @@ -1,17 +1,17 @@ -import Group from '../../Containers/group' -import {useRouter} from 'next/router' -import Image from 'next/image' -import {getGroupById} from '../../dummy' +import Group from '../../Containers/group'; +import { useRouter } from 'next/router'; +import { getGroupById } from '../../dummy'; +import Progress from '../../components/UI/progress' const GroupPage = () => { - const router = useRouter() - const id = router.query.id - - return ( -
    - -
    - ) -} + const router = useRouter(); + const group = getGroupById(router.query.id); + console.log(group, router.query); + if (group) { + return ; + } else { + return ; + } +}; -export default GroupPage +export default GroupPage;