Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/assets/icon/errorIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/components/error/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import ErrorIcon from '@/assets/icon/errorIcon.svg?react';
import BackButton from '../commons/BackButton';

const ErrorPage = () => {
return (
<section className="flex-1 w-full flex flex-col gap-[32px] p-horizontal">
<BackButton />
<h1 className="font-bold text-header px-3">
요청하신 페이지를 찾는 중 <br />
오류가 발생했습니다.
</h1>
<div className="absolute bottom-0 w-full left-1/2 transform -translate-x-1/2">
<ErrorIcon className="w-full h-auto" />
</div>
</section>
);
};

export default ErrorPage;
4 changes: 3 additions & 1 deletion src/pages/chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import ChatInput from '@/components/chat/MessageInput';
import MessageList from '@/components/chat/messageList/index';
import BackButton from '@/components/commons/BackButton';
import useWebSocket from '@/hooks/useWebSocket';
import { useParams } from 'react-router-dom';

const ChatPage = () => {
const roomId = 1;
const { id } = useParams<{ id: string }>();
const roomId = Number(id);

const { messages, sendMessage, participantCount } = useWebSocket(roomId);

Expand Down