@blocklet/pages-kit-block-studio 0.4.68 → 0.4.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -508,12 +508,11 @@ function Layout({ loadState, loadedData }) {
508
508
  }
509
509
  try {
510
510
  await api.post('/api/blocks/create', state.newBlockParams);
511
- navigate(`/${state.newBlockParams.name}?no-redirect=true`);
512
- // wait for the file to be created
511
+ state.init = false;
513
512
  setTimeout(() => {
514
- window.location.reload();
515
- }, 100);
516
- onCloseCreateBlock();
513
+ navigate(`/${state.newBlockParams.name}?no-redirect=true`);
514
+ onCloseCreateBlock();
515
+ }, 1000);
517
516
  }
518
517
  catch (error) {
519
518
  console.error('Failed to create block:', error);