diff --git a/packages/app/src/features/easy-borrow/EasyBorrowContainer.tsx b/packages/app/src/features/easy-borrow/EasyBorrowContainer.tsx index 3a33050af..3869a4c68 100644 --- a/packages/app/src/features/easy-borrow/EasyBorrowContainer.tsx +++ b/packages/app/src/features/easy-borrow/EasyBorrowContainer.tsx @@ -25,7 +25,7 @@ function EasyBorrowContainer() { borrowDetails, guestMode, openSandboxModal, - healthFactorPanelRef, + actionsPanelRef, riskAcknowledgement, actionsContext, } = useEasyBorrow() @@ -53,7 +53,7 @@ function EasyBorrowContainer() { guestMode={guestMode} openConnectModal={openConnectModal} openSandboxModal={openSandboxModal} - healthFactorPanelRef={healthFactorPanelRef} + actionsPanelRef={actionsPanelRef} riskAcknowledgement={riskAcknowledgement} actionsContext={actionsContext} /> diff --git a/packages/app/src/features/easy-borrow/components/EasyBorrowPanel.tsx b/packages/app/src/features/easy-borrow/components/EasyBorrowPanel.tsx index 2b80d3295..d4966cb3a 100644 --- a/packages/app/src/features/easy-borrow/components/EasyBorrowPanel.tsx +++ b/packages/app/src/features/easy-borrow/components/EasyBorrowPanel.tsx @@ -35,7 +35,7 @@ export interface EasyBorrowPanelProps { guestMode: boolean openConnectModal: () => void openSandboxModal: () => void - healthFactorPanelRef: React.RefObject + actionsPanelRef: React.RefObject actionsContext: InjectedActionsContext } @@ -75,7 +75,7 @@ export function EasyBorrowPanel(props: EasyBorrowPanelProps) { )} )} - + void - healthFactorPanelRef: React.RefObject + actionsPanelRef: React.RefObject actionsContext: InjectedActionsContext } @@ -85,7 +85,7 @@ export function useEasyBorrow(): UseEasyBorrowResults { const upgradeOptions = useUpgradeOptions({ chainId, daiSymbol }) const [pageStatus, setPageStatus] = useState('form') - const healthFactorPanelRef = useRef(null) + const actionsPanelRef = useRef(null) const userPositions = imputeNativeAsset(marketInfo, nativeAssetInfo) const alreadyDeposited = useConditionalFreeze( @@ -199,7 +199,7 @@ export function useEasyBorrow(): UseEasyBorrowResults { ) useEffect(() => { if (pageStatus === 'confirmation') { - healthFactorPanelRef.current?.scrollIntoView({ behavior: 'smooth', block: 'start' }) + actionsPanelRef.current?.scrollIntoView({ behavior: 'smooth', block: 'start' }) } }, [pageStatus]) @@ -243,7 +243,7 @@ export function useEasyBorrow(): UseEasyBorrowResults { borrowDetails, guestMode, openSandboxModal, - healthFactorPanelRef, + actionsPanelRef, riskAcknowledgement, actionsContext: { marketInfo, diff --git a/packages/app/src/features/easy-borrow/views/EasyBorrowView.stories.tsx b/packages/app/src/features/easy-borrow/views/EasyBorrowView.stories.tsx index 2d885fd50..31252b5b8 100644 --- a/packages/app/src/features/easy-borrow/views/EasyBorrowView.stories.tsx +++ b/packages/app/src/features/easy-borrow/views/EasyBorrowView.stories.tsx @@ -111,7 +111,7 @@ function EasyBorrowViewStory(props: EasyBorrowViewStoryProps) { guestMode={guestMode} openConnectModal={openConnectModal} openSandboxModal={openSandboxModal} - healthFactorPanelRef={healthFactorPanelRef} + actionsPanelRef={healthFactorPanelRef} riskAcknowledgement={riskAcknowledgement} actionsContext={{ marketInfo: mockMarketInfo }} /> diff --git a/packages/app/src/features/easy-borrow/views/EasyBorrowView.tsx b/packages/app/src/features/easy-borrow/views/EasyBorrowView.tsx index 6358ebcf7..0500b9c00 100644 --- a/packages/app/src/features/easy-borrow/views/EasyBorrowView.tsx +++ b/packages/app/src/features/easy-borrow/views/EasyBorrowView.tsx @@ -28,7 +28,7 @@ export interface EasyBorrowViewProps { guestMode: boolean openConnectModal: () => void openSandboxModal: () => void - healthFactorPanelRef: React.RefObject + actionsPanelRef: React.RefObject actionsContext: InjectedActionsContext }