diff --git a/apps/web/Components/Calculation/Output/index.jsx b/apps/web/Components/Calculation/Output/index.jsx index 7b80501..9624b08 100644 --- a/apps/web/Components/Calculation/Output/index.jsx +++ b/apps/web/Components/Calculation/Output/index.jsx @@ -42,7 +42,7 @@ const Wrapper = styled(Background)` } `; -export const Output = observer(() => { +export const Output = observer(({ tabs }) => { const { $results } = useStore(); const [activeKey, setActiveKey] = useState(undefined); const { hasErrors } = useErrors(); @@ -52,15 +52,15 @@ export const Output = observer(() => { setActiveKey('payments-table'); } - if (hasErrors) { + if (!tabs && hasErrors) { setActiveKey('validation'); } - }, [$results.payments.length, hasErrors]); + }, [$results.payments.length, hasErrors, tabs]); return ( x.key !== 'validation') : items} activeKey={activeKey} onChange={(key) => { setActiveKey(key); diff --git a/apps/web/Components/Layout/Navigation.jsx b/apps/web/Components/Layout/Navigation.jsx index b4655aa..d692878 100644 --- a/apps/web/Components/Layout/Navigation.jsx +++ b/apps/web/Components/Layout/Navigation.jsx @@ -58,7 +58,7 @@ export function Tabs({ tabs }) { return tabs.map(({ Component, key }) => ( - + )); }