From fceb03ac4ba1fb35f9ffb16f22e1bd00e6cdfddf Mon Sep 17 00:00:00 2001 From: Vhatever Date: Thu, 2 Jul 2026 18:30:37 +0300 Subject: [PATCH 1/2] haha --- src/App.tsx | 17 +- src/components/Navbar.tsx | 28 +- src/components/PeopleFilters.tsx | 121 +++-- src/components/PeoplePage.tsx | 125 +++++- src/components/PeopleTable.tsx | 749 +++++-------------------------- src/components/SearchLink.tsx | 23 +- 6 files changed, 352 insertions(+), 711 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index adcb8594e..d074a8deb 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,3 +1,4 @@ +import { Routes, Route, Navigate } from 'react-router-dom'; import { PeoplePage } from './components/PeoplePage'; import { Navbar } from './components/Navbar'; @@ -10,9 +11,19 @@ export const App = () => {
-

Home Page

-

Page not found

- + + Home Page} /> + } /> + + } /> + } /> + + + Page not found} + /> +
diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 3f63898b2..50a9dc067 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,4 +1,8 @@ +import { NavLink, useLocation } from 'react-router-dom'; + export const Navbar = () => { + const { search } = useLocation(); + return ( diff --git a/src/components/PeopleFilters.tsx b/src/components/PeopleFilters.tsx index c9c819cd3..5a7576f89 100644 --- a/src/components/PeopleFilters.tsx +++ b/src/components/PeopleFilters.tsx @@ -1,18 +1,36 @@ +import { useSearchParams } from 'react-router-dom'; +import cn from 'classnames'; +import { SearchLink } from './SearchLink'; + export const PeopleFilters = () => { + const [searchParams, setSearchParams] = useSearchParams(); + const query = searchParams.get('query') || ''; + const sex = searchParams.get('sex') || ''; + const selectedCenturies = searchParams.getAll('centuries'); + return (