From d9ab67cd199beb409be430bd4cd0a42643ba7ea4 Mon Sep 17 00:00:00 2001 From: monoid Date: Mon, 24 Jul 2023 11:21:26 +0900 Subject: [PATCH] fix: encode url for percent encoding --- islands/StockList.tsx | 3 ++- routes/index.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/islands/StockList.tsx b/islands/StockList.tsx index c603b6b..7aad411 100644 --- a/islands/StockList.tsx +++ b/islands/StockList.tsx @@ -94,6 +94,7 @@ name: string}){ const parent = useRef(null); useEffect(()=>{ (async ()=>{ + console.log("animation mount on ",name); const {default:autoAnimate} = await import("https://esm.sh/@formkit/auto-animate@0.7.0"); parent.current && autoAnimate(parent.current) })(); @@ -170,7 +171,7 @@ function filterInfo(info: Coperation[], filterList: FilterInfoOption) { export default function StockListUI(props: StockProps) { const sig = useAsync<[PageCorpsInfo, CorpSimple[], CorpSimple[]]>(async () => { const res = await Promise.all([ - fetch("/api/pages/" + props.pageName), + fetch("/api/pages/" + encodeURIComponent(props.pageName)), fetch("/api/kospi"), fetch("/api/kosdaq"), ]); diff --git a/routes/index.tsx b/routes/index.tsx index 0032712..0dfebab 100644 --- a/routes/index.tsx +++ b/routes/index.tsx @@ -33,7 +33,7 @@ export default function Home({data}: PageProps) {