-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat/issue-28 #134
Feat/issue-28 #134
Changes from 8 commits
88ea2fe
36b1829
8b1d6b1
14f0109
4b1b78a
9041e58
28b8ca4
5dff4f0
1cb7f37
544263b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import { RoomPreview } from "./RoomPreview"; | ||
import styled from '@emotion/styled'; | ||
import { RoomsInfo } from '../../stores/useRoomStore'; | ||
import { useEffect } from "react"; | ||
|
||
const RoomPreviewList = () => { | ||
const roomsInfo = RoomsInfo.getState(); | ||
console.log(roomsInfo.rooms); | ||
const RoomPreviewList = ({ roomsPreviewListData, refetchRooms }) => { | ||
|
||
useEffect(() => { | ||
console.log(roomsPreviewListData); | ||
}, [roomsPreviewListData]); | ||
|
||
return ( | ||
<RoomPreviewListWrapper> | ||
<RoomPreviewListSection> | ||
|
||
{/* Grid */} | ||
<ChattingRoomListGridContainer> | ||
{roomsInfo.rooms.map((item, index) => ( | ||
{roomsPreviewListData?.map((item, index) => ( | ||
<RoomPreview | ||
key={index} | ||
roomId={item.roomId} | ||
|
@@ -23,7 +25,6 @@ const RoomPreviewList = () => { | |
))} | ||
</ChattingRoomListGridContainer> | ||
|
||
</RoomPreviewListSection> | ||
</RoomPreviewListWrapper> | ||
) | ||
}; | ||
|
@@ -32,14 +33,18 @@ export default RoomPreviewList; | |
|
||
|
||
const RoomPreviewListWrapper = styled.main` | ||
|
||
` | ||
|
||
const RoomPreviewListSection = styled.section` | ||
height: 100%; | ||
width: 100%; | ||
` | ||
|
||
export const ChattingRoomListGridContainer = styled.div` | ||
const ChattingRoomListGridContainer = styled.div` | ||
height: 100%; | ||
width: 100%; | ||
box-sizing: border-box; | ||
display: grid; | ||
align-items: start; | ||
justify-items: start; | ||
grid-template-columns: repeat(5, 1fr); | ||
gap: 16px; | ||
padding: 1.25rem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. padding값이 오버하게 들어가서 흘러넘치는거일수도있음. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 추후에 더 확인해보겠습니다. |
||
`; |
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.
이거 쓸모 없는거같은데?
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.
삭제했습니다! 감사합니다