Skip to content

Commit

Permalink
chore: hide warning icon
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriocomo committed Dec 16, 2024
1 parent a3ab1bc commit 23ba658
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/app/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -241,6 +239,7 @@ export default function Editor() {
reset({ ...defaultValues });
checkPubliccodeYmlVersion(getValues() as PublicCode);
setPublicCodeImported(false);
setWarnings([])
};

const setFormDataAfterImport = async (
Expand Down Expand Up @@ -306,10 +305,11 @@ export default function Editor() {
<div className="p-2 bd-highlight">
<PubliccodeYmlLanguages />
</div>
<div className="p-2 bd-highlight" >
<Icon icon="it-warning-circle" color="warning" title={t("editor.warnings")} onClick={() => setWarningModalVisibility(true)} />&nbsp;
{t("editor.warnings")}
</div>
{!!warnings.length &&
<div className="p-2 bd-highlight" >
<Icon icon="it-warning-circle" color="warning" title={t("editor.warnings")} onClick={() => setWarningModalVisibility(true)} />&nbsp;
</div>
}
</div>
<div className='mt-3'></div>
<FormProvider {...methods}>
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import {
documentationUrl,
} from "../contents/constants";

import { useTranslation } from "react-i18next";
import { Dropdown, DropdownMenu, DropdownToggle, Icon, LinkList, LinkListItem } from "design-react-kit";
import { useTranslation } from "react-i18next";
import { formatLanguageLabel, getSupportedLanguages } from "../../i18n";

export const Head = (): JSX.Element => {
Expand Down

0 comments on commit 23ba658

Please sign in to comment.