score:1

Accepted answer
function App() {
  return (
    <BrowserRouter>
      <>
        <Header />
        <Router />
        <Footer />
      </>
    </BrowserRouter>
  );
}

score:3

 const Router = () => {
    return (
        <Routes>
            <Route
                path='/:category/search/:keyword'
                element={Catalog}
            />
            <Route
                path='/:category/:id'
                element={Detail}
            />
            <Route
                path='/:category'
                element={Catalog}
            />
            <Route
                path='/'
                exact
                element={Home}
            />
        </Routes>
    );
}

Related Query

More Query from same tag