diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx
index 56a8402..728b4c4 100755
--- a/src/components/Navbar/Navbar.jsx
+++ b/src/components/Navbar/Navbar.jsx
@@ -1,11 +1,12 @@
import { scb as logo } from '../../images';
+import { NavLink } from "react-router-dom";
import NavbarLink from './NavbarLink';
import './Navbar.styles.scss';
const mock = [
{
text: "НОВОСТИ",
- to: "/",
+ to: "/news",
},
{
text: "О НАС",
@@ -26,18 +27,20 @@ const mock = [
{
text: "ИКТИБ",
to: "https://ictis.sfedu.ru",
- newTab: true,
+ newTab: true,
},
];
function Navbar({ links = mock }) {
return (
-
-

-
+
+
+

+
+
- { links.map(link => ) }
+ {links.map(link => )}
);
diff --git a/src/components/Navbar/NavbarLink.jsx b/src/components/Navbar/NavbarLink.jsx
index 4f431b6..034ee39 100755
--- a/src/components/Navbar/NavbarLink.jsx
+++ b/src/components/Navbar/NavbarLink.jsx
@@ -1,16 +1,22 @@
import { NavLink } from "react-router-dom";
+import { Children } from "react";
-function NavbarLink({ link }) {
+function NavbarLink({ link, children }) {
return (
`nav-link ${isActive ? 'active' : isPending ? 'disabled' : ''
}`
}
- to={ link.to }
- target={ link.newTab && '_blank' }
+ to={link.to}
+ target={link.newTab && '_blank'}
>
- { link.text }
+ {link.text}
+ {Children.map(children, (child) => (
+ <>
+ {child}
+ >
+ ))}
);
}