Skip to content

Commit

Permalink
refactor: move outer content wrapper to form component for better res…
Browse files Browse the repository at this point in the history
…ponsibility boundaries
  • Loading branch information
fairlighteth committed Jan 24, 2025
1 parent 32baf5e commit c245484
Showing 1 changed file with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,18 @@ export function TradeWidget(props: TradeWidgetProps) {
}

return (
<>
<styledEl.Container id={id}>
<TradeWidgetUpdaters
disableQuotePolling={disableQuotePolling}
disableNativeSelling={disableNativeSelling}
tradeQuoteStateOverride={tradeQuoteStateOverride}
enableSmartSlippage={enableSmartSlippage}
onChangeRecipient={props.actions.onChangeRecipient}
>
{slots.updaters}
</TradeWidgetUpdaters>
<styledEl.Container id={id}>
<TradeWidgetUpdaters
disableQuotePolling={disableQuotePolling}
disableNativeSelling={disableNativeSelling}
tradeQuoteStateOverride={tradeQuoteStateOverride}
enableSmartSlippage={enableSmartSlippage}
onChangeRecipient={props.actions.onChangeRecipient}
>
{slots.updaters}
</TradeWidgetUpdaters>

<styledEl.Container>{modals || <TradeWidgetForm {...props} slots={slotsWithBanner} />}</styledEl.Container>
</styledEl.Container>
{!isVisible && <styledEl.OuterContentWrapper>{slots.outerContent}</styledEl.OuterContentWrapper>}
</>
<styledEl.Container>{modals || <TradeWidgetForm {...props} slots={slotsWithBanner} />}</styledEl.Container>
</styledEl.Container>
)
}

0 comments on commit c245484

Please sign in to comment.