Skip to content

Commit

Permalink
Patterns Browse Screen: Fix back button when switching between catego…
Browse files Browse the repository at this point in the history
…ries (#52964)
  • Loading branch information
andrewserong committed Jul 27, 2023
1 parent d1a8081 commit fb5f660
Showing 1 changed file with 5 additions and 13 deletions.
Expand Up @@ -12,19 +12,11 @@ export default function CategoryItem( {
label,
type,
} ) {
const linkInfo = useLink(
{
path: '/patterns',
categoryType: type,
categoryId: id,
},
{
// Keep a record of where we came from in state so we can
// use the browser's back button to go back to Patterns.
// See the implementation of the back button in patterns-list.
backPath: '/patterns',
}
);
const linkInfo = useLink( {
path: '/patterns',
categoryType: type,
categoryId: id,
} );

if ( ! count ) {
return;
Expand Down

0 comments on commit fb5f660

Please sign in to comment.