-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to single entry point for Stylebook and Patterns
- Loading branch information
1 parent
177b2b8
commit a858f93
Showing
6 changed files
with
69 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/edit-site/src/components/home-view-preview/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
|
||
import { store as coreStore } from '@wordpress/core-data'; | ||
import { select } from '@wordpress/data'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
|
||
import Editor from '../editor'; | ||
import { StyleBookPreview } from '../style-book'; | ||
|
||
export function HomeViewPreview() { | ||
const isBlockBasedTheme = | ||
select( coreStore ).getCurrentTheme()?.is_block_theme; | ||
|
||
// If theme is block based, return the Editor, otherwise return the StyleBookPreview. | ||
return isBlockBasedTheme ? <Editor /> : <StyleBookPreview />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import Editor from '../editor'; | ||
import SidebarNavigationScreenMain from '../sidebar-navigation-screen-main'; | ||
import { HomeViewPreview } from '../home-view-preview'; | ||
|
||
export const homeRoute = { | ||
name: 'home', | ||
path: '/', | ||
areas: { | ||
sidebar: <SidebarNavigationScreenMain />, | ||
preview: <Editor />, | ||
mobile: <SidebarNavigationScreenMain />, | ||
preview: <HomeViewPreview />, | ||
mobile: <HomeViewPreview />, | ||
}, | ||
}; |
35 changes: 0 additions & 35 deletions
35
packages/edit-site/src/components/site-editor-routes/static-stylebook.js
This file was deleted.
Oops, something went wrong.