diff --git a/client/src/App.js b/client/src/App.js
index ad30557..38c8c40 100644
--- a/client/src/App.js
+++ b/client/src/App.js
@@ -16,7 +16,6 @@ const App = ({ history }) => {
- {/* */}
diff --git a/client/src/components/Cards/Cards.js b/client/src/components/Cards/Cards.js
new file mode 100644
index 0000000..b7d2bb0
--- /dev/null
+++ b/client/src/components/Cards/Cards.js
@@ -0,0 +1,68 @@
+import React from 'react';
+import { Card, CardActions, CardContent, Typography, Grid, IconButton, makeStyles } from '@material-ui/core'
+
+import DeleteIcon from '@material-ui/icons/Delete'
+import AlarmIcon from '@material-ui/icons/Alarm';
+import EditIcon from '@material-ui/icons/Edit';
+
+const useStyles = makeStyles((theme) => ({
+ alarmIcon: {
+ marginRight: 10
+ },
+ cardActions: {
+ justifyContent: 'flex-end'
+ },
+ cardHeading: {
+ marginBottom: 10
+ },
+ cardCategoryHeading: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ fontSize: 14
+ },
+ cardAlarm: {
+ display: 'flex',
+ alignItems: 'center'
+ },
+ fab: {
+ position: 'fixed',
+ margin: 30,
+ bottom: theme.spacing(2),
+ right: theme.spacing(2),
+ },
+}))
+
+const Cards = ({ data }) => {
+ const classes = useStyles()
+ return data.map((e, i) =>
+
+
+
+
+ Категория 1
+
+
+ 18:00
+
+
+
+ Todo 1
+
+
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising.
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default Cards
\ No newline at end of file
diff --git a/client/src/components/Fab/Fab.js b/client/src/components/Fab/Fab.js
new file mode 100644
index 0000000..99aabb9
--- /dev/null
+++ b/client/src/components/Fab/Fab.js
@@ -0,0 +1,35 @@
+import React from 'react';
+import { Fab, makeStyles } from '@material-ui/core'
+import AddIcon from '@material-ui/icons/Add'
+import EditIcon from '@material-ui/icons/Edit';
+
+const useStyles = makeStyles((theme) => ({
+ fab: {
+ position: 'fixed',
+ margin: 30,
+ bottom: theme.spacing(2),
+ right: theme.spacing(2),
+ },
+}))
+
+const renderIcon = (typeIcon) => {
+ switch(typeIcon) {
+ case 'add':
+ return
+ case 'edit':
+ return
+ default:
+ break;
+ }
+}
+
+const FabComponent = ({ typeIcon, color, secondary, size, ariaLabel }) => {
+ const classes = useStyles()
+ return (
+
+ {renderIcon(typeIcon)}
+
+ )
+}
+
+export default FabComponent
\ No newline at end of file
diff --git a/client/src/components/Header/Header.js b/client/src/components/Header/Header.js
index 8fb7f12..d71b97f 100644
--- a/client/src/components/Header/Header.js
+++ b/client/src/components/Header/Header.js
@@ -1,17 +1,12 @@
import React from 'react';
-import AppBar from '@material-ui/core/AppBar';
-import IconButton from '@material-ui/core/IconButton';
+import Nav from '../Nav/Nav'
+import { AppBar, IconButton, Toolbar, Typography, makeStyles } from '@material-ui/core'
+
import MenuIcon from '@material-ui/icons/Menu';
import CategoryIcon from '@material-ui/icons/Category';
import DeleteIcon from '@material-ui/icons/Delete';
import ErrorIcon from '@material-ui/icons/Error';
-import Toolbar from '@material-ui/core/Toolbar';
-import Typography from '@material-ui/core/Typography'
import FormatListBulletedIcon from '@material-ui/icons/FormatListBulleted';
-import { makeStyles } from '@material-ui/core/styles'
-import Nav from '../Nav/Nav'
-
-const drawerWidth = 240;
const useStyles = makeStyles((theme) => ({
pageHeading: {
@@ -23,8 +18,8 @@ const useStyles = makeStyles((theme) => ({
},
appBar: {
[theme.breakpoints.up('sm')]: {
- width: `calc(100% - ${drawerWidth}px)`,
- marginLeft: drawerWidth,
+ width: `calc(100% - 240px)`,
+ marginLeft: 240,
},
},
menuButton: {
diff --git a/client/src/components/Nav/Nav.js b/client/src/components/Nav/Nav.js
index 43a0735..000ed2a 100644
--- a/client/src/components/Nav/Nav.js
+++ b/client/src/components/Nav/Nav.js
@@ -1,20 +1,16 @@
import React from 'react'
-import Drawer from '@material-ui/core/Drawer';
import NavContent from './NavContent/NavContent'
-import Hidden from '@material-ui/core/Hidden';
-import { makeStyles, useTheme } from '@material-ui/core/styles'
-
-const drawerWidth = 240;
+import { Drawer, Hidden, makeStyles, useTheme } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
drawer: {
[theme.breakpoints.up('sm')]: {
- width: drawerWidth,
+ width: 240,
flexShrink: 0,
},
},
drawerPaper: {
- width: drawerWidth,
+ width: 240,
},
}));
diff --git a/client/src/components/Nav/NavContent/NavContent.js b/client/src/components/Nav/NavContent/NavContent.js
index 661eafe..c2704ad 100644
--- a/client/src/components/Nav/NavContent/NavContent.js
+++ b/client/src/components/Nav/NavContent/NavContent.js
@@ -1,22 +1,15 @@
import React from 'react';
-import Divider from '@material-ui/core/Divider';
+import { Link } from 'react-router-dom'
+import MuiLink from '@material-ui/core/Link';
+import { Divider, List, ListItemIcon, ListItemText, Collapse, ListItem, IconButton, Typography, makeStyles } from '@material-ui/core'
+
import FormatListBulletedIcon from '@material-ui/icons/FormatListBulleted';
import CategoryIcon from '@material-ui/icons/Category';
import AddIcon from '@material-ui/icons/Add';
import DeleteIcon from '@material-ui/icons/Delete';
-import List from '@material-ui/core/List';
-import ListItem from '@material-ui/core/ListItem';
-import ListItemIcon from '@material-ui/core/ListItemIcon';
-import ListItemText from '@material-ui/core/ListItemText';
import GitHubIcon from '@material-ui/icons/GitHub';
-import Collapse from '@material-ui/core/Collapse'
import ExpandLess from '@material-ui/icons/ExpandLess'
import ExpandMore from '@material-ui/icons/ExpandMore'
-import IconButton from '@material-ui/core/IconButton'
-import MuiLink from '@material-ui/core/Link';
-import { Link } from 'react-router-dom'
-import { makeStyles } from '@material-ui/core/styles'
-import { Typography } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
navHeading: {
diff --git a/client/src/containers/Category/Category.js b/client/src/containers/Category/Category.js
index fb56bda..0b3fc1a 100644
--- a/client/src/containers/Category/Category.js
+++ b/client/src/containers/Category/Category.js
@@ -1,31 +1,21 @@
import React from 'react';
-import { Grid, Typography, Fab } from '@material-ui/core'
-import { makeStyles } from '@material-ui/core/styles'
-import EditIcon from '@material-ui/icons/Edit';
-// import { useParams } from 'react-router-dom'
+import Cards from '../../components/Cards/Cards'
+import Fab from '../../components/Fab/Fab'
+import { Grid, Typography } from '@material-ui/core'
-const useStyles = makeStyles((theme) => ({
- fab: {
- position: 'fixed',
- margin: 30,
- bottom: theme.spacing(2),
- right: theme.spacing(2),
- },
-}))
+// import { useParams } from 'react-router-dom'
const Category = () => {
// const { slug } = useParams()
- const classes = useStyles()
return (
-
-
-
+
- {`Сортируйте свои повседневные задачи используя категории.`}
+ Сортируйте свои повседневные задачи используя категории
+
)
}
diff --git a/client/src/containers/Todos/Todos.js b/client/src/containers/Todos/Todos.js
index 58c17d2..d69ed22 100644
--- a/client/src/containers/Todos/Todos.js
+++ b/client/src/containers/Todos/Todos.js
@@ -1,85 +1,18 @@
import React from 'react';
-import Card from '@material-ui/core/Card';
-import CardActions from '@material-ui/core/CardActions';
-import CardContent from '@material-ui/core/CardContent';
-import Typography from '@material-ui/core/Typography'
-import Grid from '@material-ui/core/Grid'
-import Fab from '@material-ui/core/Fab';
-import AddIcon from '@material-ui/icons/Add';
-import DeleteIcon from '@material-ui/icons/Delete'
-import IconButton from '@material-ui/core/IconButton'
-import AlarmIcon from '@material-ui/icons/Alarm';
-import EditIcon from '@material-ui/icons/Edit';
-import { makeStyles } from '@material-ui/core/styles'
-
-const useStyles = makeStyles((theme) => ({
- alarmIcon: {
- marginRight: 10
- },
- cardActions: {
- justifyContent: 'flex-end'
- },
- cardHeading: {
- marginBottom: 10
- },
- cardCategoryHeading: {
- display: 'flex',
- justifyContent: 'space-between',
- fontSize: 14
- },
- cardAlarm: {
- display: 'flex',
- alignItems: 'center'
- },
- fab: {
- position: 'fixed',
- margin: 30,
- bottom: theme.spacing(2),
- right: theme.spacing(2),
- },
-}))
+import Cards from '../../components/Cards/Cards'
+import Fab from '../../components/Fab/Fab'
+import { Typography, Grid } from '@material-ui/core'
const Todos = () => {
- const classes = useStyles()
return (
-
-
-
+
Создавайте, редактируйте или удаляйте ваши повседневные дела.
-
- {[1,2,3,4,5,6].map((e, i) =>
-
-
-
-
- Категория 1
-
-
- 18:00
-
-
-
- Todo 1
-
-
- But I must explain to you how all this mistaken idea of denouncing pleasure and praising.
-
-
-
-
-
-
-
-
-
-
-
-
- )}
+
+
)
}
diff --git a/client/src/containers/Trash/Trash.js b/client/src/containers/Trash/Trash.js
index 7e58286..5593d58 100644
--- a/client/src/containers/Trash/Trash.js
+++ b/client/src/containers/Trash/Trash.js
@@ -1,4 +1,5 @@
import React from 'react';
+import Cards from '../../components/Cards/Cards'
import { Grid, Typography } from '@material-ui/core'
const Trash = () => {
@@ -9,6 +10,7 @@ const Trash = () => {
Здесь находятся ваши недавно удаленные записи, вы можете их легко восстановить.
+
)
}