From 77d79c42f5aabdae5adae1d4c33e0bf136f09f14 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 19 Oct 2023 11:47:34 +0100 Subject: [PATCH] Implemented hide warnings --- apps/circuit-compiler/src/app/components/container.tsx | 2 +- apps/circuit-compiler/src/app/components/feedback.tsx | 4 ++-- apps/circuit-compiler/src/app/components/options.tsx | 7 +++++-- apps/circuit-compiler/src/app/reducers/state.ts | 7 +++++++ apps/circuit-compiler/src/app/types/index.ts | 5 ++++- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/apps/circuit-compiler/src/app/components/container.tsx b/apps/circuit-compiler/src/app/components/container.tsx index c46b4dbba8..51096de544 100644 --- a/apps/circuit-compiler/src/app/components/container.tsx +++ b/apps/circuit-compiler/src/app/components/container.tsx @@ -58,7 +58,7 @@ export function Container () { - + diff --git a/apps/circuit-compiler/src/app/components/feedback.tsx b/apps/circuit-compiler/src/app/components/feedback.tsx index 24433b57f5..3d7a6b94f1 100644 --- a/apps/circuit-compiler/src/app/components/feedback.tsx +++ b/apps/circuit-compiler/src/app/components/feedback.tsx @@ -4,7 +4,7 @@ import { RenderIf } from '@remix-ui/helper' import {CopyToClipboard} from '@remix-ui/clipboard' import { FeedbackAlert } from './feedbackAlert' -export function CompilerFeedback ({ feedback, filePathToId, openErrorLocation }: CompilerFeedbackProps) { +export function CompilerFeedback ({ feedback, filePathToId, hideWarnings, openErrorLocation }: CompilerFeedbackProps) { const [ showException, setShowException ] = useState(true) const handleCloseException = () => { @@ -43,7 +43,7 @@ export function CompilerFeedback ({ feedback, filePathToId, openErrorLocation }: - +
diff --git a/apps/circuit-compiler/src/app/components/options.tsx b/apps/circuit-compiler/src/app/components/options.tsx index c02854eb7f..29dc056170 100644 --- a/apps/circuit-compiler/src/app/components/options.tsx +++ b/apps/circuit-compiler/src/app/components/options.tsx @@ -7,6 +7,9 @@ export function CompileOptions () { const handleCircuitAutoCompile = (value: boolean) => { dispatch({ type: 'SET_AUTO_COMPILE', payload: value }) } + const handleCircuitHideWarnings = (value: boolean) => { + dispatch({ type: 'SET_HIDE_WARNINGS', payload: value }) + } return (
@@ -26,11 +29,11 @@ export function CompileOptions () {
handleCircuitHideWarnings(e.target.checked)} id="hideCircuitWarnings" type="checkbox" title="Hide warnings" - // checked={state.hideWarnings} + checked={appState.hideWarnings} />