Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Editor: Fix the 'Browse all' link in the template details modal #48301

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/edit-site/src/components/template-details/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ export default function TemplateDetails( { template, onClose } ) {
);
const { revertTemplate } = useDispatch( editSiteStore );

// TODO: We should update this to filter by template part's areas as well.
const browseAllLinkProps = useLink( {
// TODO: We should update this to filter by template part's areas as well.
canvas: 'view',
postType: template.type,
postId: undefined,
path: '/' + template.type + '/all',
Comment on lines +34 to +39
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The broweAllLink version from the sidebar navigation component doesn't work in the edit mode.

const browseAllLink = useLink( {
path: '/' + postType + '/all',
} );

} );

const isTemplatePart = template.type === 'wp_template_part';
Expand Down