From c447e6a04af845e7c5f85192a818eb23db968e3e Mon Sep 17 00:00:00 2001 From: mohammedsalah7 Date: Tue, 9 Nov 2021 12:44:13 +0200 Subject: [PATCH 1/2] create component for link #95 --- client/src/components/Navbar/index.js | 40 +++++-------------- .../components/common/LinkComponent/index.jsx | 22 ++++++++++ 2 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 client/src/components/common/LinkComponent/index.jsx diff --git a/client/src/components/Navbar/index.js b/client/src/components/Navbar/index.js index 4d2c5ca..9c9bf4f 100644 --- a/client/src/components/Navbar/index.js +++ b/client/src/components/Navbar/index.js @@ -2,15 +2,15 @@ import React, { useState } from 'react'; import { Link } from 'react-router-dom'; import { - ListItem, ListItemText, Button, Avatar, Container, List, + ListItemText, Button, Avatar, Container, List, } from '@mui/material'; import './style.css'; import Logo from '../../asstes/logo.png'; import PresonImg from '../../asstes/avatar.png'; +import LinkComponent from '../common/LinkComponent'; function NavBar() { - const [logged, setLogged] = useState(true); return ( diff --git a/client/src/components/common/LinkComponent/index.jsx b/client/src/components/common/LinkComponent/index.jsx new file mode 100644 index 0000000..88a619b --- /dev/null +++ b/client/src/components/common/LinkComponent/index.jsx @@ -0,0 +1,22 @@ +import { Link } from 'react-router-dom'; +import { ListItem, ListItemText } from '@mui/material'; +import PropTypes from 'prop-types'; + +const LinkComponent = ({ + to, styleList, name, +}) => ( +
+ + + + + +
+); +LinkComponent.propTypes = { + name: PropTypes.string.isRequired, + to: PropTypes.string.isRequired, + styleList: PropTypes.objectOf.isRequired, +}; + +export default LinkComponent; From d3c9e48fb9e8a2da1b267cad1956e473309d4116 Mon Sep 17 00:00:00 2001 From: mohammedsalah7 Date: Tue, 9 Nov 2021 13:16:43 +0200 Subject: [PATCH 2/2] edit assets folder #95 --- client/src/{asstes => assets}/avatar.png | Bin client/src/{asstes => assets}/logo.png | Bin 2 files changed, 0 insertions(+), 0 deletions(-) rename client/src/{asstes => assets}/avatar.png (100%) rename client/src/{asstes => assets}/logo.png (100%) diff --git a/client/src/asstes/avatar.png b/client/src/assets/avatar.png similarity index 100% rename from client/src/asstes/avatar.png rename to client/src/assets/avatar.png diff --git a/client/src/asstes/logo.png b/client/src/assets/logo.png similarity index 100% rename from client/src/asstes/logo.png rename to client/src/assets/logo.png