-
Notifications
You must be signed in to change notification settings - Fork 12
1주차 과제입니다 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
1주차 과제입니다 #21
Conversation
iubns
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상대방의 이름이 나올 수 있도록 해주세요!.
나머진 좋은거 같아요!
| {selectedFriend ? ( | ||
| <Chat | ||
| selectedFriend={selectedFriend} | ||
| onBack={() => setSelectedFriend(null)} | ||
| /> | ||
| ) : ( | ||
| <FriendList onSelectChat={setSelectedFriend} /> | ||
| )} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 라우팅 하지 말고 next의 라우팅을 사용해주세요.
| import React, { useState, useRef, useEffect } from "react"; | ||
| import "./App.css"; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 프로젝트의 package.json 파일은 어디 갔을까요?
| .App { | ||
| display: flex; | ||
| flex-direction: column; | ||
| height: 100vh; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
css의 class name 중복을 방지하기 위해
css module을 사용해주세요.
| <Routes> | ||
| <Route path="/" element={<Navigate to="/login" />} /> | ||
| <Route path="/login" element={<Login />} /> | ||
| <Route path="/register" element={<Register />} /> | ||
|
|
||
| {/* 채팅 화면 */} | ||
| <Route path="/chat" element={ | ||
| <FriendList onSelectChat={(friend) => setSelectedFriend(friend)} /> | ||
| } /> | ||
|
|
||
| {/* 친구 선택 후 이동할 채팅 화면 */} | ||
| <Route path="/chat/:friendName" element={ | ||
| <Chat selectedFriend={selectedFriend} onBack={() => setSelectedFriend(null)} /> | ||
| } /> | ||
| </Routes> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
router 라이브러리를 따로 사용한거 같네요.
next로 프로젝트를 세팅하면 필요 없습니다.
| const navigate = useNavigate(); | ||
|
|
||
| const handleLogin = () => { | ||
| console.log("로그인 시도:", id, pw); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
디버깅 코드는 커밋하기 전에 확인해주세요
| console.log("회원가입 시도:", id, pw); | ||
| navigate("/login"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
회원가입 API를 연결해주세요.
|
이전 과제가 많이 밀려서 한거번에 들어 왔네요. |
No description provided.