From 0429667c3645b5c79a972225b2ce78925f6b2f5a Mon Sep 17 00:00:00 2001 From: Yasuaki Uechi Date: Fri, 2 Jul 2021 16:47:49 +0900 Subject: [PATCH] fix: properly render result from nta --- api/services/nta/[query].ts | 8 ++++---- src/components/Footer.tsx | 13 +++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/api/services/nta/[query].ts b/api/services/nta/[query].ts index 0e8ace4..f8f5264 100644 --- a/api/services/nta/[query].ts +++ b/api/services/nta/[query].ts @@ -1,11 +1,11 @@ import { send, sendError, fetch } from '../../../util/http'; -import { NowRequest, NowResponse } from '@vercel/node'; +import { VercelRequest, VercelResponse } from '@vercel/node'; const APPLICATION_ID = process.env.NTA_APPLICATION_ID; export default async function handler( - req: NowRequest, - res: NowResponse + req: VercelRequest, + res: VercelResponse ): Promise { const { query } = req.query; @@ -90,7 +90,7 @@ export default async function handler( phoneticName: entry.phoneticName, englishName: entry.englishName, })) - .slice(10) || [], + .slice(0, 10) || [], }); } catch (err) { sendError(res, err); diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 8180270..134663b 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -97,6 +97,9 @@ const Community = () => { const About = () => { const { t } = useTranslation(); + const { + i18n: { language }, + } = useTranslation(); return ( @@ -157,6 +160,16 @@ const About = () => { + + {language === 'ja' ? ( + <> +
+ 情報の取得元 +

+ このサービスは、国税庁法人番号システムのWeb-API機能を利用して取得した情報をもとに作成していますが、サービスの内容は国税庁によって保証されたものではありません。 +

+ + ) : null}
); };