Skip to content

Commit

Permalink
[FEAT] MemberList에서 리더가 가장 처음에 위치하도록 수정 (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
keemsebin authored Oct 9, 2024
1 parent ce70e3e commit 68a1851
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/features/MeetingDetail/MemberList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import { UuidProps } from './MeetingDetail.type';

export const MemberList = ({ uuid }: UuidProps) => {
const { data: memberData } = useSuspenseQuery(queries.meeting.participants(uuid));

const leader = memberData.participantInfoList.find((member) => member.isLeader);
const member = memberData.participantInfoList.filter((member) => !member.isLeader);

const totalParticipant = leader ? [leader, ...member] : memberData.participantInfoList;

return (
<FlexBox width="100%" padding="0 20px">
<Card>
Expand All @@ -19,7 +25,7 @@ export const MemberList = ({ uuid }: UuidProps) => {
{memberData.isAnonymous ? '익명' : '실명'}
</Chip>
<FlexBox flexDir="row" flexWrap="wrap" justifyContent="flex-start" gap={10}>
{memberData.participantInfoList.map((member, index) => (
{totalParticipant.map((member, index) => (
<Member
key={index}
isSubmitted={member.isAssigned}
Expand Down

0 comments on commit 68a1851

Please sign in to comment.