text: import {
    BrowserRouter as Router,
    Route,
    Switch,
    useRouteMatch,
  } from "react-router-dom";
  import Category from "pages/[profile]/[category]";
  import NewTils from "pages/[profile]/[category]/[article]/new";
  import Article from "pages/[profile]/[category]/[article]";
  import Settings from "pages/[profile]/[category]/settings";
  import CategoryLayout from "components/base/CategoryLayout";
  
  export default function CategoryRouter() {
    let { path, url } = useRouteMatch();
  
    return (
      <CategoryLayout>
        <Switch>
          <Route exact path={`${path}`}>
            <Category />
          </Route>
          <Route path={`${path}/settings`}>
            <Settings />
          </Route>
          <Route path={`${path}/:article_name`}>
            <Article />
          </Route>
        </Switch>
      </CategoryLayout>
    );
  }
  