File tree Expand file tree Collapse file tree 2 files changed +69
-1
lines changed Expand file tree Collapse file tree 2 files changed +69
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import ChatRoom from './ChatRoom';
55import  PasswordModal  from  './PasswordModal' ; 
66import  './ChatStyles.css' ; 
77import  {  API_BACKEND_URL  }  from  '../config' ; 
8+ import  {  Home  }  from  'lucide-react' ;  // Import Home icon from lucide-react 
89
910const  ChatRoomList  =  ( )  =>  { 
1011 const  [ rooms ,  setRooms ]  =  useState ( [ ] ) ; 
@@ -173,6 +174,11 @@ const ChatRoomList = () => {
173174 navigate ( '/create-room' ) ; 
174175 } ; 
175176
177+  // 홈으로 돌아가기 
178+  const  goToHome  =  ( )  =>  { 
179+  navigate ( '/home' ) ; 
180+  } ; 
181+ 
176182 // 탭 변경 시 목록 새로고침 
177183 const  handleTabChange  =  ( tab )  =>  { 
178184 setActiveTab ( tab ) ; 
@@ -272,6 +278,9 @@ const ChatRoomList = () => {
272278 < div  className = "chat-list-container" > 
273279 { /* 새로고침/생성 버튼 */ } 
274280 < div  className = "chat-action-buttons" > 
281+  < div  className = "home-btn"  onClick = { goToHome }  title = "홈으로" > 
282+  < Home  size = { 18 }  style = { {  marginRight : '5px'  } }  /> 홈으로
283+  </ div > 
275284 < div  className = "refresh-btn"  onClick = { handleRefresh }  title = "새로고침" > 
276285 < i  className = "fa-solid fa-arrows-rotate" > </ i > 새로고침
277286 </ div > 
@@ -332,7 +341,7 @@ const ChatRoomList = () => {
332341 > 
333342 < div  className = "profile-img" > 
334343 { room . imageUrl  ? ( 
335-  < img   
344+  < img 
336345 src = { getImageUrl ( room . imageUrl ) } 
337346 alt = { room . title } 
338347 className = "room-image" 
Original file line number Diff line number Diff line change 13371337 80%   {
13381338 transform :  translateX (5px  );
13391339 }
1340+ }
1341+ 
1342+ /* 홈 버튼 스타일 - ChatStyles.css에 추가 */ 
1343+ 
1344+ .home-btn  {
1345+  position :  static;
1346+  width :  auto;
1347+  height :  auto;
1348+  border-radius :  20px  ;
1349+  background-color :  # 3b82f6
1350+  /* 파란색 배경 - 다른 버튼과 구분 */ 
1351+  color :  var (--white );
1352+  display :  flex;
1353+  align-items :  center;
1354+  justify-content :  center;
1355+  padding :  8px   15px  ;
1356+  cursor :  pointer;
1357+  font-size :  14px  ;
1358+  font-weight :  500 ;
1359+  box-shadow :  0  2px   5px   rgba (0 ,  0 ,  0 ,  0.2 );
1360+  transition :  all 0.2s   ease;
1361+  border :  none;
1362+ }
1363+ 
1364+ .home-btn : hover  {
1365+  transform :  translateY (-2px  );
1366+  box-shadow :  0  4px   8px   rgba (0 ,  0 ,  0 ,  0.2 );
1367+  background-color :  # 2563eb
1368+  /* 호버 시 더 진한 파란색 */ 
1369+ }
1370+ 
1371+ /* 채팅 상단 버튼 그룹 조정 - 기존에 있지만 gap 조정 */ 
1372+ .chat-action-buttons  {
1373+  position :  absolute;
1374+  top :  15px  ;
1375+  right :  20px  ;
1376+  display :  flex;
1377+  gap :  10px  ;
1378+  z-index :  10 ;
1379+ }
1380+ 
1381+ /* 모바일 레이아웃에서 홈 버튼 조정 */ 
1382+ @media  (max-width :  768px  ) {
1383+  .home-btn  {
1384+  padding :  6px   12px  ;
1385+  font-size :  13px  ;
1386+  }
1387+ 
1388+  .chat-action-buttons  {
1389+  flex-wrap :  wrap;
1390+  /* 공간이 부족하면 버튼 줄바꿈 */ 
1391+  }
1392+ }
1393+ 
1394+ @media  (max-width :  576px  ) {
1395+  .chat-action-buttons  {
1396+  top :  70px  ;
1397+  right :  10px  ;
1398+  }
13401399}
                         You can’t perform that action at this time. 
           
                  
0 commit comments