-
+
{children}
diff --git a/client/src/components/Nav/Nav.js b/client/src/components/Nav/Nav.js
index ded2d3e..43a0735 100644
--- a/client/src/components/Nav/Nav.js
+++ b/client/src/components/Nav/Nav.js
@@ -18,7 +18,7 @@ const useStyles = makeStyles((theme) => ({
},
}));
-const Nav = ({ window, mobileOpen, handleDrawerToggle }) => {
+const Nav = ({ window, mobileOpen, handleDrawerToggle, history }) => {
const classes = useStyles();
const theme = useTheme();
@@ -40,7 +40,7 @@ const Nav = ({ window, mobileOpen, handleDrawerToggle }) => {
keepMounted: true,
}}
>
-
+
@@ -51,7 +51,7 @@ const Nav = ({ window, mobileOpen, handleDrawerToggle }) => {
variant="permanent"
open
>
-
+
diff --git a/client/src/components/Nav/NavContent/NavContent.js b/client/src/components/Nav/NavContent/NavContent.js
index 91cd2f1..661eafe 100644
--- a/client/src/components/Nav/NavContent/NavContent.js
+++ b/client/src/components/Nav/NavContent/NavContent.js
@@ -13,7 +13,8 @@ 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 Link from '@material-ui/core/Link';
+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';
@@ -39,47 +40,51 @@ const useStyles = makeStyles((theme) => ({
addCategoryItem: {
display: 'flex',
justifyContent: 'center'
+ },
+ link: {
+ textDecoration: 'none',
+ color: '#fff'
}
}))
-const Drawer = () => {
+const NavContent = ({ history }) => {
const classes = useStyles()
- const [selectedIndex, setSelectedIndex] = React.useState(0)
const [isListOpen, setIsListOpen] = React.useState({
idCollapse: 0,
current: false,
})
const listItemSelectedHandler = (e, index) => {
- setSelectedIndex(index)
if (index === 1) setIsListOpen({
idCollapse: 1,
current: !isListOpen.current
})
}
-
+
return (
<>
-
+
Todo App
-
+
- Github:
+ Github:
- listItemSelectedHandler(e, 0)} selected={selectedIndex === 0} button>
-
-
-
-
-
- listItemSelectedHandler(e, 1)} selected={selectedIndex === 1} button>
+
+
+
+
+
+
+
+
+ listItemSelectedHandler(e, 1)} button>
@@ -90,9 +95,11 @@ const Drawer = () => {
{[1,2,3].map((e, i) => {
return (
-
-
-
+
+
+
+
+
)
})}
@@ -103,15 +110,17 @@ const Drawer = () => {
- listItemSelectedHandler(e, 2)} selected={selectedIndex === 2} button>
-
-
-
-
-
+
+
+
+
+
+
+
+
>
)
}
-export default Drawer
\ No newline at end of file
+export default NavContent
\ No newline at end of file
diff --git a/client/src/containers/Category/Category.js b/client/src/containers/Category/Category.js
new file mode 100644
index 0000000..fb56bda
--- /dev/null
+++ b/client/src/containers/Category/Category.js
@@ -0,0 +1,33 @@
+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'
+
+const useStyles = makeStyles((theme) => ({
+ fab: {
+ position: 'fixed',
+ margin: 30,
+ bottom: theme.spacing(2),
+ right: theme.spacing(2),
+ },
+}))
+
+const Category = () => {
+ // const { slug } = useParams()
+ const classes = useStyles()
+ return (
+
+
+
+
+
+
+ {`Сортируйте свои повседневные задачи используя категории.`}
+
+
+
+ )
+}
+
+export default Category
\ No newline at end of file
diff --git a/client/src/containers/NotFound/NotFound.js b/client/src/containers/NotFound/NotFound.js
new file mode 100644
index 0000000..7ecefa8
--- /dev/null
+++ b/client/src/containers/NotFound/NotFound.js
@@ -0,0 +1,16 @@
+import React from 'react';
+import { Grid, Typography } from '@material-ui/core'
+
+const Trash = () => {
+ return (
+
+
+
+ ❌ Ошибка! Такого маршрута не существует.
+
+
+
+ )
+}
+
+export default Trash
\ No newline at end of file
diff --git a/client/src/containers/Todos/Todos.js b/client/src/containers/Todos/Todos.js
index 0d650af..58c17d2 100644
--- a/client/src/containers/Todos/Todos.js
+++ b/client/src/containers/Todos/Todos.js
@@ -48,7 +48,7 @@ const Todos = () => {
- Создавайте, редактируйте или удаляйте свои повседневные задачи.
+ Создавайте, редактируйте или удаляйте ваши повседневные дела.
{[1,2,3,4,5,6].map((e, i) =>
diff --git a/client/src/containers/Trash/Trash.js b/client/src/containers/Trash/Trash.js
new file mode 100644
index 0000000..7e58286
--- /dev/null
+++ b/client/src/containers/Trash/Trash.js
@@ -0,0 +1,16 @@
+import React from 'react';
+import { Grid, Typography } from '@material-ui/core'
+
+const Trash = () => {
+ return (
+
+
+
+ Здесь находятся ваши недавно удаленные записи, вы можете их легко восстановить.
+
+
+
+ )
+}
+
+export default Trash
\ No newline at end of file
diff --git a/client/src/index.js b/client/src/index.js
index 90bdefc..ee6b1d0 100644
--- a/client/src/index.js
+++ b/client/src/index.js
@@ -1,18 +1,22 @@
import React from 'react';
import ReactDOM from 'react-dom';
+import { Router } from 'react-router-dom'
import App from './App';
import { ThemeProvider } from '@material-ui/core/styles';
+import { createBrowserHistory } from 'history'
import theme from './theme';
import * as serviceWorker from './serviceWorker';
+
+const history = createBrowserHistory()
+
ReactDOM.render(
-
+
+
+
,
document.getElementById('root')
);
-// If you want your app to work offline and load faster, you can change
-// unregister() to register() below. Note this comes with some pitfalls.
-// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();