Skip to content

Commit

Permalink
Refactor: automatically open sidebar block menu on build preview (#7332)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaHungDinh authored Mar 28, 2024
1 parent 181655e commit 5386b28
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {__} from '@wordpress/i18n';
import BlockListTree from './panels/BlockListTree';
import {__experimentalLibrary as Library} from '@wordpress/block-editor';
import AdditionalFieldsPanel from '@givewp/form-builder/promos/additionalFields';
import {useSelect} from '@wordpress/data';
import {getFormBuilderWindowData} from '@givewp/form-builder/common/getWindowData';

const BlockListInserter = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const DesignEditorSkeleton = () => {

const SchemaEditorSkeleton = () => {
const {state: showSidebar, toggle: toggleShowSidebar} = useToggleState(true);
const [selectedSecondarySidebar, setSelectedSecondarySidebar] = useState('');
const [selectedSecondarySidebar, setSelectedSecondarySidebar] = useState<string>('add');

const toggleSelectedSecondarySidebar = (name) =>
setSelectedSecondarySidebar(name !== selectedSecondarySidebar ? name : false);
Expand Down

0 comments on commit 5386b28

Please sign in to comment.