- Rebuilt the entire project - now we can pass blockName in URL.
- Added "ViewMode"
This commit is contained in:
@@ -169,7 +169,7 @@ function DataOptions(props = {}) {
|
||||
}
|
||||
|
||||
async function fetchDataOptions(name = 'default') {
|
||||
const queryParameters = new URLSearchParams({name});
|
||||
const queryParameters = new URLSearchParams({name, block: window.devTool.blockName});
|
||||
const response = await fetch(`/data?${queryParameters}`);
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ function Publish(props = {}) {
|
||||
export function setupPublish(rootAttributes) {
|
||||
// INIT
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.setAttribute('id', 'publish-btn');
|
||||
document.querySelector('.page_toolbar__right').append(wrapper)
|
||||
|
||||
const root = ReactDOM.createRoot(wrapper);
|
||||
|
||||
Reference in New Issue
Block a user