Update: When clicking on a page in the entity explorer, the canvas of the page opens (#288)

This commit is contained in:
Abhinav Jha 2020-08-12 18:00:07 +05:30 committed by GitHub
parent 68e048761a
commit 38afc64a5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ type ExplorerPageEntityProps = {
export const ExplorerPageEntity = memo((props: ExplorerPageEntityProps) => {
const params = useParams<ExplorerURLParams>();
const switchPage = useCallback(() => {
if (!props.isCurrentPage && !!params.applicationId) {
if (!!params.applicationId) {
history.push(BUILDER_PAGE_URL(params.applicationId, props.page.pageId));
}
}, [props.isCurrentPage, props.page.pageId, params.applicationId]);