diff --git a/src/app/components/Editor.tsx b/src/app/components/Editor.tsx index 02e183b..dec45b7 100644 --- a/src/app/components/Editor.tsx +++ b/src/app/components/Editor.tsx @@ -123,8 +123,6 @@ export default function Editor() { localStorage.setItem(PUBLIC_CODE_EDITOR_WARNINGS, JSON.stringify(warnings)) }, [warnings]) - - const getNestedValue = (obj: PublicCodeWithDeprecatedFields, path: string) => { return path.split('.').reduce((acc, key) => (acc as never)?.[key], obj); } @@ -241,6 +239,7 @@ export default function Editor() { reset({ ...defaultValues }); checkPubliccodeYmlVersion(getValues() as PublicCode); setPublicCodeImported(false); + setWarnings([]) }; const setFormDataAfterImport = async ( @@ -306,10 +305,11 @@ export default function Editor() {