← All changes
|
js/components/EditMenu/SnippetForm/SnippetForm.tsx
+3
-1
3.10.0-beta.1
→
trunk
View file →
| @@ -8,8 +8,9 @@ | ||
| 8 | 8 | import { handleUnknownError } from '../../../utils/errors' |
| 9 | 9 | import { createSnippetObject, getSnippetType, isCondition, validateSnippet } from '../../../utils/snippets/snippets' |
| 10 | 10 | import { buildUrl } from '../../../utils/urls' |
| 11 | 11 | import { ConfirmDialog } from '../../common/ConfirmDialog' |
| 12 | +import { ScreenMetaSlot } from '../../common/ScreenMetaSlot' | |
| 12 | 13 | import { Toolbar } from '../../common/Toolbar' |
| 13 | 14 | import { UpsellBanner } from '../../common/UpsellBanner' |
| 14 | 15 | import { UpsellDialog } from '../../common/UpsellDialog' |
| 15 | 16 | import { EditorSidebar } from '../EditorSidebar' |
| @@ -95,9 +96,9 @@ | ||
| 95 | 96 | .replace(__('Create New Snippet', 'code-snippets'), __('Edit Snippet', 'code-snippets')) |
| 96 | 97 | .replace(__('Create New Condition', 'code-snippets'), __('Edit Condition', 'code-snippets')) |
| 97 | 98 | |
| 98 | 99 | const newUrl = buildUrl(window.CODE_SNIPPETS.urls.edit, { id: response.id }) |
| 99 | - window.history.pushState({}, document.title, newUrl) | |
| 100 | + window.history.replaceState({}, document.title, newUrl) | |
| 100 | 101 | } |
| 101 | 102 | } |
| 102 | 103 | }) |
| 103 | 104 | .then(refreshSnippetsList) |
| @@ -233,8 +234,9 @@ | ||
| 233 | 234 | <WithSnippetFormContext |
| 234 | 235 | initialSnippet={() => createSnippetObject(window.CODE_SNIPPETS_EDIT?.snippet)} |
| 235 | 236 | > |
| 236 | 237 | <Toolbar /> |
| 238 | + <ScreenMetaSlot /> | |
| 237 | 239 | <EditFormWrap /> |
| 238 | 240 | </WithSnippetFormContext> |
| 239 | 241 | </WithSnippetsListContext> |
| 240 | 242 | </WithSnippetsAPIContext> |