Skip to content

Commit

Permalink
[Web] [Hotfix] userAgent 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
suwonthugger committed Nov 10, 2024
1 parent d370ba2 commit 64b49a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/web/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export default function RootLayout({
);
};

// 현재 호스트가 모바일용 도메인이 아니고 모바일 기기일 경우 리다이렉트
console.log('isMobile 테스트', isMobile(), navigator.userAgent);

if (isMobile() && window.location.hostname === 'rankit.run') {
const newUrl = `https://m.rankit.run${window.location.pathname}`;
window.location.replace(newUrl);
Expand Down

0 comments on commit 64b49a0

Please sign in to comment.