From fd64ab731e000eb441f8f8eb67740198437d467d Mon Sep 17 00:00:00 2001 From: Animenosekai <40539549+Animenosekai@users.noreply.github.com> Date: Sun, 5 Jun 2022 23:27:29 +0200 Subject: [PATCH] [update] using correct host --- website/components/ui/cards/mainResult.tsx | 3 --- website/config.ts | 2 +- website/pages/api/hello.ts | 13 ------------- 3 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 website/pages/api/hello.ts diff --git a/website/components/ui/cards/mainResult.tsx b/website/components/ui/cards/mainResult.tsx index 343116e0..769ddaa3 100644 --- a/website/components/ui/cards/mainResult.tsx +++ b/website/components/ui/cards/mainResult.tsx @@ -75,8 +75,6 @@ export const MainResultCard = ({ text, language, service, loading, onNewTranslat const [currentTimeout, setCurrentTimeout] = useState(null); const [transliteration, setTransliteration] = useState(null); - console.log("MainResultCard", { text, language, service, loading, onNewTranslation, props }) - useEffect(() => { if (!service) { return } request("/transliterate", { @@ -187,7 +185,6 @@ export const MainResult = ({ result, onNewTranslation, ...props }: { }, [result]) const service = new Service(result.data.service) - console.log("result", result) return
{ if (!onNewTranslation) { diff --git a/website/config.ts b/website/config.ts index 63da2627..8c07959d 100644 --- a/website/config.ts +++ b/website/config.ts @@ -1,6 +1,6 @@ const Configuration = { request: { - host: process.env.NODE_ENV ? "http://127.0.0.1:5000" : "https://anise-translate.herokuapp.com" + host: process.env.NODE_ENV === "development" ? "http://127.0.0.1:5000" : "https://anise-translate.herokuapp.com" } } diff --git a/website/pages/api/hello.ts b/website/pages/api/hello.ts deleted file mode 100644 index f8bcc7e5..00000000 --- a/website/pages/api/hello.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Next.js API route support: https://nextjs.org/docs/api-routes/introduction -import type { NextApiRequest, NextApiResponse } from 'next' - -type Data = { - name: string -} - -export default function handler( - req: NextApiRequest, - res: NextApiResponse -) { - res.status(200).json({ name: 'John Doe' }) -}