diff --git a/apps/web/src/components/NotFound.tsx b/apps/web/src/components/NotFound.tsx new file mode 100644 index 00000000..071993cf --- /dev/null +++ b/apps/web/src/components/NotFound.tsx @@ -0,0 +1,20 @@ +import { Link } from '@tanstack/react-router'; + +import TicleCharacterBadge from '@/assets/images/ticle-character-badge.png'; +import TicleLogo from '@/assets/ticle.svg?react'; +import Button from '@/components/common/Button'; + +function NotFound() { + return ( +
+ 티클 캐릭터 + +

페이지가 존재하지 않습니다

+ + + +
+ ); +} + +export default NotFound; diff --git a/apps/web/src/components/NotSupportedMobile.tsx b/apps/web/src/components/NotSupportedMobile.tsx new file mode 100644 index 00000000..73c66030 --- /dev/null +++ b/apps/web/src/components/NotSupportedMobile.tsx @@ -0,0 +1,15 @@ +import TicleCharacterBadge from '@/assets/images/ticle-character-badge.png'; +import TicleLogo from '@/assets/ticle.svg?react'; + +function NotSupportedMobile() { + return ( +
+ 티클 캐릭터 + +

모바일 환경은 지원하지 않습니다

+

데스크톱 브라우저에서 접속해주세요.

+
+ ); +} + +export default NotSupportedMobile; diff --git a/apps/web/src/hooks/mediasoup/useSocket.ts b/apps/web/src/hooks/mediasoup/useSocket.ts index 9675cb66..018eda2e 100644 --- a/apps/web/src/hooks/mediasoup/useSocket.ts +++ b/apps/web/src/hooks/mediasoup/useSocket.ts @@ -50,7 +50,6 @@ const useSocket = (): UseSocketReturn => { }); socket.on(SOCKET_EVENTS.disconnect, () => { - navigate({ to: '/', replace: true }); setIsConnected(false); setIsError(null); }); diff --git a/apps/web/src/routes/__root.tsx b/apps/web/src/routes/__root.tsx index f3ef751b..0244f2c3 100644 --- a/apps/web/src/routes/__root.tsx +++ b/apps/web/src/routes/__root.tsx @@ -1,12 +1,19 @@ import { Outlet, ScrollRestoration, createRootRoute } from '@tanstack/react-router'; +import NotFound from '@/components/NotFound'; +import NotSupportedMobile from '@/components/NotSupportedMobile'; import { ToastContainer } from '@/components/toast/ToastContainer'; export const Route = createRootRoute({ component: RootComponent, + notFoundComponent: NotFound, }); function RootComponent() { + if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) { + return ; + } + return (