diff --git a/src/components/header/Nav.tsx b/src/components/header/Nav.tsx index ea6fb2b..ab881ac 100644 --- a/src/components/header/Nav.tsx +++ b/src/components/header/Nav.tsx @@ -1,32 +1,30 @@ // Modules -import { Link } from "react-router-dom"; +import { Link } from 'react-router-dom'; +import { v4 as uuidv4 } from 'uuid'; + +// Types +import { navListDataType, navListItemType } from '../../types/header.types'; + +const data: navListDataType = [ + { title: 'Политика', path: '/category' }, + { title: 'Экономика', path: '/category' }, + { title: 'Общество', path: '/category' }, + { title: 'Культура', path: '/category' }, + { title: 'Спорт', path: '/category' }, + { title: 'Технологии', path: '/category' }, + { title: 'Экология', path: '/category' }, +]; const Nav = () => { return (
    -
  • - Политика -
  • -
  • - Экономика -
  • -
  • - Общество -
  • -
  • - Культура -
  • -
  • - Спорт -
  • -
  • - Технологии -
  • -
  • - Экология -
  • + {data.map((dataItem: navListItemType) => ( +
  • + {dataItem.title} +
  • + ))}
diff --git a/src/types/header.types.ts b/src/types/header.types.ts new file mode 100644 index 0000000..3f338c8 --- /dev/null +++ b/src/types/header.types.ts @@ -0,0 +1,5 @@ +export interface navListItemType { + path: string; + title: string; +} +export type navListDataType = navListItemType[];