From e71c50e9ad64c9b215c10265a799280b264e7903 Mon Sep 17 00:00:00 2001 From: dongsilove Date: Fri, 24 Oct 2025 23:42:03 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20wr=20=ED=95=98=EC=88=98=EC=9E=AC?= =?UTF-8?q?=EC=9D=B4=EC=9A=A9=ED=86=B5=EA=B3=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/(without-layout)/layout.tsx | 2 +- .../(without-layout)/stats/hasuStat/page.tsx | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/wr/app/(without-layout)/layout.tsx b/apps/wr/app/(without-layout)/layout.tsx index 3577697f5..cbb9738cf 100644 --- a/apps/wr/app/(without-layout)/layout.tsx +++ b/apps/wr/app/(without-layout)/layout.tsx @@ -8,6 +8,6 @@ export default function RootLayout({ return ( - {children} + <>{children} ); } diff --git a/apps/wr/app/(without-layout)/stats/hasuStat/page.tsx b/apps/wr/app/(without-layout)/stats/hasuStat/page.tsx index a0166aa30..ee568e75a 100644 --- a/apps/wr/app/(without-layout)/stats/hasuStat/page.tsx +++ b/apps/wr/app/(without-layout)/stats/hasuStat/page.tsx @@ -19,21 +19,20 @@ export default function HasuStatPage() { if (!res.ok) throw new Error("no-ip"); const data = await res.json(); const ip: string = data?.ip || ""; - console.log("Client IP:", ip); if (didCancel) return; + alert("Client IP:" + ip); const is10 = /^10\./.test(ip); setStatus(is10 ? "redirect-internal" : "redirect-root"); - // // Use location.replace so user can't go back to this page - // if (is10) { - // // redirect to internal IP - // // window.location.replace("http://10.101.163.102:8888/cms/lay1/WS10000014/program.do"); - // window.open('http://10.101.163.102:8888/cms/lay1/WS10000014/program.do', '_blank'); - // } else { - // //window.location.replace("https://www.hasudoinfo.or.kr/cms/lay1/WS10000014/program.do"); - // window.open('https://www.hasudoinfo.or.kr/cms/lay1/WS10000014/program.do', '_blank'); - // } + // Use location.replace so user can't go back to this page + if (is10) { + // redirect to internal IP + window.open('http://10.101.163.102:8888/cms/lay1/WS10000014/program.do', '_blank'); + } else { + window.open('https://www.hasudoinfo.or.kr/cms/lay1/WS10000014/program.do', '_blank'); + } + window.history.back(); } catch { // If anything fails, fall back to root if (!didCancel) {