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) {