Skip to content
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

[FE] 추천 약속 리스트를 선택할 때 key 값을 startDate + index 대신 rank로 변경 #318

Merged
merged 2 commits into from
Aug 23, 2024
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
1 change: 1 addition & 0 deletions frontend/src/apis/meetingRecommend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface MeetingRecommend {
endDayOfWeek: string;
endTime: string;
attendeeNames: string[];
rank: string;
}
export const getMeetingTimeRecommends = async ({
uuid,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { useMutation } from '@tanstack/react-query';
import React, { useState } from 'react';
import { useState } from 'react';
import { useNavigate } from 'react-router-dom';

import {
s_attendeesContainer,
s_tipInfo,
} from '@pages/MeetingConfirmPage/MeetingTimeConfirmPage.styles';

import MeetingTimeOptionCard from '@components/MeetingTimeCard/MeetingTimeOptionCard';
import { Button } from '@components/_common/Buttons/Button';
import TabButton from '@components/_common/Buttons/TabButton';
Expand All @@ -12,7 +17,6 @@ import useMeetingTimeRecommendFilter from '@hooks/useMeetingTimeRecommendFilter/
import { postMeetingConfirm } from '@apis/meetingConfirm';
import type { MeetingRecommend } from '@apis/meetingRecommend';

import { s_attendeesContainer, s_tipInfo } from '../MeetingTimeConfirmPage.styles';
import { s_container } from './MeetingTimeOptions.styles';

interface MeetingTimeOptionsProps {
Expand Down Expand Up @@ -113,9 +117,9 @@ export default function MeetingTimeOptions({ uuid, attendeeNames }: MeetingTimeO
]}
/>
{meetingTimeRecommends &&
meetingTimeRecommends.map((recommendInfo, index) => (
meetingTimeRecommends.map((recommendInfo) => (
<MeetingTimeOptionCard
key={recommendInfo.startDate + index}
key={recommendInfo.rank}
isSelected={checkSelectedMeeting(recommendInfo)}
onSelect={() => handleMeetingSelect(recommendInfo)}
attendeeCount={attendeeNames.length}
Expand Down