Skip to content

Commit

Permalink
Add more versatile URL handling
Browse files Browse the repository at this point in the history
This adds highlighting to links.

I've also fixed the URL system so it can match more than one segment at a time.

I've also refactored a few things to simplify the code.
  • Loading branch information
gaearon committed May 20, 2020
1 parent 7618204 commit e7a4690
Show file tree
Hide file tree
Showing 2 changed files with 266 additions and 170 deletions.
5 changes: 4 additions & 1 deletion fixtures/frame/pages/[[...all]].js
Expand Up @@ -3,6 +3,9 @@ import App from '../src/App';

export default function Root() {
const router = useRouter();
if (router.asPath === '/[[...all]]') {
return null;
}
// We're gonna do our own routing.
return <App segments={router.query.all || []} />;
return <App url={router.asPath} />;
}

0 comments on commit e7a4690

Please sign in to comment.