From 5e59a11b08e771af2c7f8be40886219b7f2b148c Mon Sep 17 00:00:00 2001 From: Sergio <137483700+KaratSergio@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:20:57 +0200 Subject: [PATCH] add Navigation --- src/components/Navigation/Navigation.jsx | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/components/Navigation/Navigation.jsx diff --git a/src/components/Navigation/Navigation.jsx b/src/components/Navigation/Navigation.jsx new file mode 100644 index 0000000..749b32e --- /dev/null +++ b/src/components/Navigation/Navigation.jsx @@ -0,0 +1,28 @@ +import { UseSelector } from "react-redux"; +import { NavLink } from 'react-router-dom'; + +import { UserMenu } from '../UserMenu/UserMenu' + +const Navigation = () => { + const isLoggedIn = useSelector(selectIsLoggedIn); + + return ( + <> +
+ Home + {isLoggedIn ? ( + Contacts + ) : ( +
+ {!isLoggedIn && } + {!isLoggedIn && } +
+ )} +
+ + {isLoggedIn && } + + ); +}; + +export default Navigation; \ No newline at end of file