File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/js/components/SnippetForm/page Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { useSnippetForm } from '../../../hooks/useSnippetForm'
66const OPTIONS = window . CODE_SNIPPETS_EDIT
77
88export const PageHeading : React . FC = ( ) => {
9- const { snippet, updateSnippet } = useSnippetForm ( )
9+ const { snippet, updateSnippet, setCurrentNotice } = useSnippetForm ( )
1010
1111 return (
1212 < h1 >
@@ -18,6 +18,7 @@ export const PageHeading: React.FC = () => {
1818 < a href = { window . CODE_SNIPPETS ?. urls . addNew } className = "page-title-action" onClick = { event => {
1919 event . preventDefault ( )
2020 updateSnippet ( ( ) => createEmptySnippet ( ) )
21+ setCurrentNotice ( undefined )
2122
2223 window . document . title = window . document . title . replace (
2324 __ ( 'Edit Snippet' , 'code-snippets' ) ,
You can’t perform that action at this time.
0 commit comments