Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add more versatile URL handling
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 81edd50
Show file tree
Hide file tree
Showing 2 changed files with 268 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 81edd50

Please sign in to comment.