diff --git a/packages/frontend/app/components/LiquidityDialog.tsx b/packages/frontend/app/components/LiquidityDialog.tsx index 00757aea2f..917370ab1c 100644 --- a/packages/frontend/app/components/LiquidityDialog.tsx +++ b/packages/frontend/app/components/LiquidityDialog.tsx @@ -1,7 +1,7 @@ import { Dialog } from '@headlessui/react' import { Form } from '@remix-run/react' import type { ChangeEvent } from 'react' -import { useState } from 'react' +import { useEffect, useRef, useState } from 'react' import { XIcon } from '~/components/icons' import { Button, Input } from '~/components/ui' @@ -42,6 +42,13 @@ export const LiquidityDialog = ({ setActualAmount(integerScaledInput) } + const inputRef = useRef(null) + useEffect(() => { + if (inputRef.current) { + inputRef.current.focus() + } + }, []) + return (
@@ -67,6 +74,7 @@ export const LiquidityDialog = ({