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

Update: Move template actions to the editor store. #60395

Merged
Prev Previous commit
Next Next commit
remove unrequired async await.
  • Loading branch information
jorgefilipecosta committed Apr 11, 2024
commit b462c780d6067e6c9e994f834eb90134085b70f1
8 changes: 4 additions & 4 deletions packages/edit-site/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ export const addTemplate =
*/
export const removeTemplate =
( template ) =>
async ( { registry } ) => {
await unlock( registry.dispatch( editorStore ) ).removeTemplates( [
( { registry } ) => {
return unlock( registry.dispatch( editorStore ) ).removeTemplates( [
template,
] );
};
Expand Down Expand Up @@ -345,8 +345,8 @@ export function setIsSaveViewOpened( isOpen ) {
*/
export const revertTemplate =
( template, options ) =>
async ( { registry } ) => {
await unlock( registry.dispatch( editorStore ) ).revertTemplate(
( { registry } ) => {
return unlock( registry.dispatch( editorStore ) ).revertTemplate(
template,
options
);
Expand Down
Loading