From 4e32c9a01b78a68e37a41c454c619e71549f93ca Mon Sep 17 00:00:00 2001 From: "sipc.ink" <92251518+SIPC@users.noreply.github.com> Date: Sun, 10 Mar 2024 18:50:24 +0800 Subject: [PATCH] Update index.tsx --- src/pages/index.tsx | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 2095d83..bd83c33 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -9,6 +9,7 @@ import { MessagesSquare, ChevronsLeftRight, ChevronsRightLeft, + HandCoins, } from "lucide-react"; import { Label } from "@/components/ui/label"; import { useState } from "react"; @@ -38,8 +39,12 @@ export default function Home() { const [to, setTo] = useState("zh"); const [isExpanded, setIsExpanded] = useState(false); - const [loader, setLoader] = useState(initializeTranslateloader); - const [result, setResult] = useState(initializeTranslateState); + const [loader, setLoader] = useState( + initializeTranslateloader, + ); + const [result, setResult] = useState( + initializeTranslateState, + ); const handleClick = () => { setIsExpanded(!isExpanded); @@ -166,10 +171,11 @@ export default function Home() { onChange={setFrom} placeholder={`Source Language`} /> - { const temp = from; - if (temp != 'auto') { + if (temp != "auto") { setFrom(to); setTo(temp); } @@ -182,6 +188,14 @@ export default function Home() { />
+