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 authored and ramonjd committed Jul 28, 2023
1 parent adc34b3 commit 11c2429
Showing 1 changed file with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
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 11c2429

Please sign in to comment.