Skip to content
Open
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
8 changes: 4 additions & 4 deletions src/pages/promiseStatus/PromiseStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useSearchParams } from 'react-router-dom';
import Pending from './components/Pending';
import Pending from '@/pages/promiseStatus/components/Pending';
import { PROMISE_STATUS } from '@shared/constant/promiseStatus';
import Voting from './components/Voting';
import Confirmed from './components/Confirmed';
import Voting from '@/pages/promiseStatus/components/Voting';
import Confirmed from '@/pages/promiseStatus/components/Confirmed';

export default function PromiseStatus() {
const [searchParams] = useSearchParams();
Expand All @@ -14,7 +14,7 @@ export default function PromiseStatus() {
<>
{status === PROMISE_STATUS.PENDING && <Pending promiseId={promiseId} isHost={isHost} />}
{status === PROMISE_STATUS.VOTING && <Voting promiseId={promiseId} isHost={isHost} />}
{status === PROMISE_STATUS.CONFIRMED && <Confirmed promiseId={promiseId} isHost={isHost} />}
{status === PROMISE_STATUS.CONFIRMED && <Confirmed promiseId={promiseId} />}
</>
);
}
39 changes: 39 additions & 0 deletions src/pages/promiseStatus/components/Confirmed.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { style } from '@vanilla-extract/css';

export const confirmedWrapper = style({
position: 'relative',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
paddingTop: '9.8rem',
height: '100vh',
});

export const containerStyle = style({
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
gap: '40px',
});

export const confirmedText = style({
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
gap: '1rem',
});

export const promiseDetailWrapper = style({
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
});

export const confirmedButton = style({
position: 'fixed',
bottom: '0',
width: '100%',
padding: '1.5rem',
});
76 changes: 72 additions & 4 deletions src/pages/promiseStatus/components/Confirmed.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,76 @@
import { useNavigate } from 'react-router-dom';
import Container from '@shared/components/container/Container';
import Text from '@shared/components/text/Text';
import { mockUpConfirmed } from '../mockUp';
import KakaoMap from '@shared/components/kakaoMap/KakaoMap';
import usePlaceSearch from '@shared/components/kakaoMap/hooks/usePlaceSearch';
import { useState, useEffect } from 'react';
import { MAP_SIZE } from '@shared/components/kakaoMap/constant/mapSize';
import PromiseDetail from '@shared/components/promiseDetail/PromiseDetail';
import { PROMISE_STATUS, PROMISE_STATUS_CONFIG } from '@shared/constant/promiseStatus';
import Button from '@shared/components/button/Button';
import { BUTTON_VARIANTS } from '@shared/components/button/constant/button';
import * as styles from '@/pages/promiseStatus/components/Confirmed.css';

interface ConfirmedProps {
promiseId: string;
isHost: boolean;
}
export default function Confirmed({ promiseId, isHost }: ConfirmedProps) {
console.log(promiseId, isHost);
return <div></div>;
export default function Confirmed({ promiseId }: ConfirmedProps) {
const navigate = useNavigate();
const { promiseName, promisePlace, promiseAvailableTimes, promiseMembersNames } = mockUpConfirmed;
const { searchPlace } = usePlaceSearch();
const [place, setPlace] = useState<{ lat: number; lng: number } | null>(null);

useEffect(() => {
searchPlace(promisePlace.placeAddress)
.then(res => res[0])
.then(placeData => {
if (placeData) {
setPlace({ lat: placeData.lat, lng: placeData.lng });
}
})
.catch(error => {
console.error('Failed to search place:', error);
});
}, [searchPlace, promisePlace.placeAddress]);

const handleClose = () => {
console.log(promiseId);

Check warning on line 38 in src/pages/promiseStatus/components/Confirmed.tsx

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement. Only these console methods are allowed: warn, error, info
navigate(`/`);
};
Comment on lines +37 to +40
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

λΆˆν•„μš”ν•œ console.log 제거 (λΉŒλ“œ 체크 κ²½κ³  ν•΄κ²°)

체크 도ꡬ가 logλ₯Ό κΈˆμ§€ν•©λ‹ˆλ‹€. ν•„μš” μ—†λ‹€λ©΄ μ œκ±°ν•˜κ±°λ‚˜ info둜 κ΅μ²΄ν•˜μ„Έμš”.

   const handleClose = () => {
-    console.log(promiseId);
     navigate(`/`);
   };
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const handleClose = () => {
console.log(promiseId);
navigate(`/`);
};
const handleClose = () => {
navigate(`/`);
};
🧰 Tools
πŸͺ› GitHub Check: build

[warning] 38-38:
Unexpected console statement. Only these console methods are allowed: warn, error, info

πŸ€– Prompt for AI Agents
In src/pages/promiseStatus/components/Confirmed.tsx around lines 37 to 40,
remove the unnecessary console.log(promiseId) to satisfy the lint/build rule
that forbids console.* calls; if the information is needed, replace it with the
project's logging utility (e.g., logger.info) or dispatch it to a proper
debug/logging mechanism, then keep the navigate(`/`) call as-is.


return (
<div className={styles.confirmedWrapper}>
<Container className={styles.containerStyle}>
<div className={styles.confirmedText}>
<Text tag="head_bold_24" color="black">
{promiseName}
</Text>
<Text tag="body_bold_16" color="black">
약속이 ν™•μ •λ˜μ—ˆμ–΄μš”
</Text>
</div>
<KakaoMap center={place || undefined} size={MAP_SIZE.SMALL} />
<div className={styles.promiseDetailWrapper}>
<PromiseDetail
status={PROMISE_STATUS.CONFIRMED}
promiseId={parseInt(promiseId)}
promiseName={promiseName}
fixedDate={promiseAvailableTimes.date}
placeName={promisePlace.placeName}
promiseMembersNames={promiseMembersNames}
/>
</div>
</Container>
<div className={styles.confirmedButton}>
<Button
text="확인"
size="long"
variant={BUTTON_VARIANTS.ENABLED}
onClick={handleClose}
backgroundColor={PROMISE_STATUS_CONFIG.CONFIRMED.color}
/>
</div>
</div>
);
}
52 changes: 52 additions & 0 deletions src/pages/promiseStatus/components/Voting.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { vars } from '@shared/styles/theme.css';
import { style } from '@vanilla-extract/css';

export const votingWrapper = style({
position: 'relative',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
background: vars.color.blue0,
});

export const containerStyle = style({
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: '40px',
minHeight: 'calc(100vh - 9.8rem - 8rem)',
background: vars.color.blue0,
});

export const votingText = style({
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
gap: '1rem',
});

export const votingPlaceWrapper = style({
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
gap: '2rem',
});

export const votingButtonWrapper = style({
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: '1rem',
width: '100%',
});

export const votingButton = style({
position: 'sticky',
bottom: '0',
left: '0',
right: '0',
width: '100%',
padding: '1.5rem',
});
130 changes: 128 additions & 2 deletions src/pages/promiseStatus/components/Voting.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,134 @@
import Header from '@shared/components/header/Header';
import { IcNavX } from '@svg/index';
import { useNavigate } from 'react-router-dom';
import * as styles from '@/pages/promiseStatus/components/Voting.css';
import Container from '@shared/components/container/Container';
import Text from '@shared/components/text/Text';
import { mockUpVoting } from '@/pages/promiseStatus/mockUp';
import Button from '@shared/components/button/Button';
import { PROMISE_STATUS_CONFIG } from '@shared/constant/promiseStatus';
import { BUTTON_VARIANTS } from '@shared/components/button/constant/button';
import { useState } from 'react';

interface VotingProps {
promiseId: string;
isHost: boolean;
}
export default function Voting({ promiseId, isHost }: VotingProps) {
console.log(promiseId, isHost);
return <div></div>;
const navigate = useNavigate();
const handleClose = () => {
console.log(promiseId);

Check warning on line 20 in src/pages/promiseStatus/components/Voting.tsx

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement. Only these console methods are allowed: warn, error, info
navigate(`/`);
};
const { promiseName, promisePlace, promiseAvailableTimes } = mockUpVoting;
const [selectedPlace, setSelectedPlace] = useState<
{
placeName: string;
placeAddress: string;
}[]
>([]);
const [selectedTime, setSelectedTime] = useState<
{
date: string;
startTime: string;
endTime: string;
}[]
>([]);

const handlePlaceClick = (place: { placeName: string; placeAddress: string }) => {
if (selectedPlace.includes(place)) {
setSelectedPlace(prev => prev.filter(p => p !== place));
} else {
setSelectedPlace(prev => [...prev, place]);
}
};

const handleTimeClick = (time: { date: string; startTime: string; endTime: string }) => {
if (selectedTime.includes(time)) {
setSelectedTime(prev =>
prev.filter(
t => t.date !== time.date && t.startTime !== time.startTime && t.endTime !== time.endTime
)
);
} else {
setSelectedTime(prev => [...prev, time]);
}
};
Comment on lines +46 to +56
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

선택 ν•΄μ œ 둜직 버그: 동일 λ‚ μ§œ/μ‹œκ°„μ΄ ν•œ ν•„λ“œλ§Œ 같아도 μ „λΆ€ μ œκ±°λ©λ‹ˆλ‹€

μ‹œκ°„ 선택 ν† κΈ€ ν•΄μ œ μ‹œ ν•„ν„° 쑰건이 !==λ₯Ό &&둜 λ¬Άκ³  μžˆμ–΄, ν•œ ν•„λ“œ(예: date)만 같아도 ν•΄λ‹Ή ν•­λͺ©μ΄ μ œκ±°λ©λ‹ˆλ‹€. 동일 ν•­λͺ©λ§Œ μ œκ±°ν•˜λ €λ©΄ μ°Έμ‘° 비ꡐ λ˜λŠ” 3개 ν•„λ“œ λͺ¨λ‘μ˜ 일치 μ—¬λΆ€λ₯Ό κΈ°μ€€μœΌλ‘œ μ œκ±°ν•΄μ•Ό ν•©λ‹ˆλ‹€.

λ‹€μŒκ³Ό 같이 μ°Έμ‘° λΉ„κ΅λ‘œ κ°„λ‹¨νžˆ μˆ˜μ •ν•˜λŠ” 것을 ꢌμž₯ν•©λ‹ˆλ‹€(μƒλ‹¨μ˜ includes λ‘œμ§κ³Όλ„ 일관적):

   const handleTimeClick = (time: { date: string; startTime: string; endTime: string }) => {
     if (selectedTime.includes(time)) {
-      setSelectedTime(prev =>
-        prev.filter(
-          t => t.date !== time.date && t.startTime !== time.startTime && t.endTime !== time.endTime
-        )
-      );
+      setSelectedTime(prev => prev.filter(t => t !== time));
     } else {
       setSelectedTime(prev => [...prev, time]);
     }
   };
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const handleTimeClick = (time: { date: string; startTime: string; endTime: string }) => {
if (selectedTime.includes(time)) {
setSelectedTime(prev =>
prev.filter(
t => t.date !== time.date && t.startTime !== time.startTime && t.endTime !== time.endTime
)
);
} else {
setSelectedTime(prev => [...prev, time]);
}
};
const handleTimeClick = (time: { date: string; startTime: string; endTime: string }) => {
if (selectedTime.includes(time)) {
setSelectedTime(prev => prev.filter(t => t !== time));
} else {
setSelectedTime(prev => [...prev, time]);
}
};
πŸ€– Prompt for AI Agents
In src/pages/promiseStatus/components/Voting.tsx around lines 46 to 56, the
deselect filter currently removes items if any single field differs because it
uses combined !== checks with &&; change the removal logic so it only removes
the exact same selected time β€” either by using reference equality consistent
with the includes check (compare objects directly) or by keeping value
comparison but only exclude items where all three fields match (date AND
startTime AND endTime); update the filter predicate accordingly so other items
with a matching single field are not removed.


const handleVote = () => {
console.log(selectedPlace, selectedTime);

Check warning on line 59 in src/pages/promiseStatus/components/Voting.tsx

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement. Only these console methods are allowed: warn, error, info
handleClose();
};

const isFormValid = !isHost && selectedPlace.length > 0 && selectedTime.length > 0;

return (
<div className={styles.votingWrapper}>
<Header rightIcon={IcNavX} onClickRightIcon={handleClose} background="blue0" />
<Container className={styles.containerStyle}>
<div className={styles.votingText}>
<Text tag="head_bold_24" color="black">
{promiseName}의 μ΅œμ’… νˆ¬ν‘œλ₯Ό μ§„ν–‰ν•΄μ£Όμ„Έμš”
</Text>
<Text tag="body_bold_16" color="gray4">
졜적의 μ‹œκ°„κ³Ό μž₯μ†Œμž…λ‹ˆλ‹€
</Text>
{isHost && (
<Text tag="body_bold_16" color="red1">
약속 μƒμ„±μžλŠ” νˆ¬ν‘œ ν•  수 μ—†μŠ΅λ‹ˆλ‹€.
</Text>
)}
Comment on lines +76 to +80
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

μ‚¬μš©μž λ…ΈμΆœ 문ꡬ μ˜€νƒˆμž: β€˜νˆ¬ν‘œ 할’ β†’ β€˜νˆ¬ν‘œν• β€™

μ‚¬μš©μžμ—κ²Œ 직접 λ…ΈμΆœλ˜λŠ” 문ꡬ의 띄어쓰기λ₯Ό μˆ˜μ •ν•˜μ„Έμš”.

-            <Text tag="body_bold_16" color="red1">
-              약속 μƒμ„±μžλŠ” νˆ¬ν‘œ ν•  수 μ—†μŠ΅λ‹ˆλ‹€.
-            </Text>
+            <Text tag="body_bold_16" color="red1">
+              약속 μƒμ„±μžλŠ” νˆ¬ν‘œν•  수 μ—†μŠ΅λ‹ˆλ‹€.
+            </Text>
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{isHost && (
<Text tag="body_bold_16" color="red1">
약속 μƒμ„±μžλŠ” νˆ¬ν‘œ ν•  수 μ—†μŠ΅λ‹ˆλ‹€.
</Text>
)}
{isHost && (
<Text tag="body_bold_16" color="red1">
약속 μƒμ„±μžλŠ” νˆ¬ν‘œν•  수 μ—†μŠ΅λ‹ˆλ‹€.
</Text>
)}
πŸ€– Prompt for AI Agents
In src/pages/promiseStatus/components/Voting.tsx around lines 76 to 80, the
displayed Korean string contains a spacing typo: "νˆ¬ν‘œ ν• " should be corrected to
"νˆ¬ν‘œν• "; update the Text node content to use the corrected single-word form so the
rendered UI shows "약속 μƒμ„±μžλŠ” νˆ¬ν‘œν•  수 μ—†μŠ΅λ‹ˆλ‹€."

</div>

<div className={styles.votingPlaceWrapper}>
<Text tag="head_bold_18" color="black">
약속 μž₯μ†Œλ₯Ό μ„ νƒν•΄μ£Όμ„Έμš”
</Text>
<div className={styles.votingButtonWrapper}>
{promisePlace.map(place => {
const isSelected = selectedPlace.includes(place);
return (
<Button
key={place.placeName}
onClick={() => handlePlaceClick(place)}
variant={isSelected ? BUTTON_VARIANTS.ENABLED : BUTTON_VARIANTS.WHITE}
size="long"
text={place.placeName}
backgroundColor={isSelected ? PROMISE_STATUS_CONFIG.VOTING.color : 'white'}
/>
);
})}
</div>
</div>
<div className={styles.votingPlaceWrapper}>
<Text tag="head_bold_18" color="black">
약속 μ‹œκ°„μ„ μ„ νƒν•΄μ£Όμ„Έμš”
</Text>
<div className={styles.votingButtonWrapper}>
{promiseAvailableTimes.map(time => {
const isSelected = selectedTime.includes(time);
return (
<Button
key={`${time.date}-${time.startTime}-${time.endTime}`}
onClick={() => handleTimeClick(time)}
variant={isSelected ? BUTTON_VARIANTS.ENABLED : BUTTON_VARIANTS.WHITE}
Comment on lines +108 to +114
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

React key 쀑볡 κ°€λŠ₯μ„±: 동일 κ°’μ˜ μ‹œκ°„ 데이터가 μ—¬λŸ¬ 개면 ν‚€ 좩돌 λ°œμƒ

mockUpVoting의 promiseAvailableTimesκ°€ 동일 κ°’μœΌλ‘œ μ—¬λŸ¬ 개 μ‘΄μž¬ν•©λ‹ˆλ‹€. ν˜„μž¬ ν‚€κ°€ κ°’ μ‘°ν•©λ§Œ μ‚¬μš©ν•˜λ―€λ‘œ 쀑볡 ν‚€κ°€ λ°œμƒν•©λ‹ˆλ‹€. 인덱슀λ₯Ό 덧뢙여 고유 ν‚€λ₯Ό 보μž₯ν•˜μ„Έμš”.

-            {promiseAvailableTimes.map(time => {
+            {promiseAvailableTimes.map((time, idx) => {
               const isSelected = selectedTime.includes(time);
               return (
                 <Button
-                  key={`${time.date}-${time.startTime}-${time.endTime}`}
+                  key={`${time.date}-${time.startTime}-${time.endTime}-${idx}`}
                   onClick={() => handleTimeClick(time)}
                   variant={isSelected ? BUTTON_VARIANTS.ENABLED : BUTTON_VARIANTS.WHITE}
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{promiseAvailableTimes.map(time => {
const isSelected = selectedTime.includes(time);
return (
<Button
key={`${time.date}-${time.startTime}-${time.endTime}`}
onClick={() => handleTimeClick(time)}
variant={isSelected ? BUTTON_VARIANTS.ENABLED : BUTTON_VARIANTS.WHITE}
{promiseAvailableTimes.map((time, idx) => {
const isSelected = selectedTime.includes(time);
return (
<Button
key={`${time.date}-${time.startTime}-${time.endTime}-${idx}`}
onClick={() => handleTimeClick(time)}
variant={isSelected ? BUTTON_VARIANTS.ENABLED : BUTTON_VARIANTS.WHITE}
>
{/* … */}
</Button>
);
})}
πŸ€– Prompt for AI Agents
In src/pages/promiseStatus/components/Voting.tsx around lines 108 to 114, the
map uses a composite key of time.date-time.startTime-time.endTime which can
collide when identical time objects exist; change the map callback to include
the index (e.g., map((time, idx) => ...)) and append the idx to the key to
guarantee uniqueness (e.g.,
`${time.date}-${time.startTime}-${time.endTime}-${idx}`), ensuring stable
rendering without introducing other logic changes.

size="long"
text={`${time.date} ${time.startTime.slice(0, 5)}-${time.endTime.slice(0, 5)}`}
backgroundColor={isSelected ? PROMISE_STATUS_CONFIG.VOTING.color : 'white'}
/>
);
})}
</div>
</div>
</Container>
<div className={styles.votingButton}>
<Button
text="νˆ¬ν‘œν•˜κΈ°"
size="long"
variant={isFormValid ? BUTTON_VARIANTS.ENABLED : BUTTON_VARIANTS.DISABLED}
onClick={handleVote}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

약속μž₯μ†Œ, μ‹œκ°„ 선택 μ•ˆ ν–ˆμ„λ•Œ (νˆ¬ν‘œν•˜κΈ°κ°€ νšŒμƒ‰μΌλ•Œ)에도 λ²„νŠΌμ„ λˆ„λ₯΄λ©΄ handleVoteκ°€ λ™μž‘ν•˜μ—¬ ν™ˆμœΌλ‘œ μ΄λ™ν•©λ‹ˆλ‹€.

/>
</div>
</div>
);
}
60 changes: 60 additions & 0 deletions src/pages/promiseStatus/mockUp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,63 @@ export const mockUpPlace = {
},
],
};

export const mockUpVoting = {
promiseName: 'KUIT BARO 2차 회의',
promisePlace: [
{
placeName: '강남역 μŠ€νƒ€λ²…μŠ€',
placeAddress: 'μ„œμšΈνŠΉλ³„μ‹œ 강남ꡬ 역삼동 123-123',
},
{
placeName: 'κ±΄κ΅­λŒ€ν•™κ΅ μ€‘μ•™λ„μ„œκ΄€',
placeAddress: 'μ„œμšΈνŠΉλ³„μ‹œ 강남ꡬ 역삼동 123-123',
},

{
placeName: '강남역 νˆ¬μΈν”Œλ ˆμ΄μŠ€',
placeAddress: 'μ„œμšΈνŠΉλ³„μ‹œ 강남ꡬ 역삼동 123-123',
},
{
placeName: 'κ±΄κ΅­λŒ€ν•™κ΅ 신곡학관',
placeAddress: 'μ„œμšΈνŠΉλ³„μ‹œ 강남ꡬ 역삼동 123-123',
},
],
promiseAvailableTimes: [
{
date: '2025-04-03',
startTime: '12:00:00',
endTime: '12:30:00',
},
{
date: '2025-04-03',
startTime: '12:00:00',
endTime: '12:30:00',
},
{
date: '2025-04-03',
startTime: '12:00:00',
endTime: '12:30:00',
},
{
date: '2025-04-03',
startTime: '12:00:00',
endTime: '12:30:00',
},
],
};

export const mockUpConfirmed = {
promiseName: 'KUIT BARO 2차 회의',
promisePlace: {
placeName: '강남역 μŠ€νƒ€λ²…μŠ€',
placeAddress: 'μ„œμšΈνŠΉλ³„μ‹œ 강남ꡬ 역삼동 123-123',
},

promiseAvailableTimes: {
date: '2025-04-03',
startTime: '12:00:00',
endTime: '12:30:00',
},
promiseMembersNames: ['John Doe', 'Jane Doe', 'John Smith', 'Jane Smith'],
};
Comment on lines +125 to +138
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Verification agent

🧩 Analysis chain

API DTO와 λͺ©μ—… ꡬ쑰가 μƒμ΄ν•©λ‹ˆλ‹€ β€” μΆ”ν›„ μ‹€μ œ 연동 μ‹œ μ–΄λŒ‘ν„°/νƒ€μž… μ •ν•©μ„± 확인 ν•„μš”

ν˜„μž¬ Confirmed λͺ©μ—…은 place와 time을 쀑첩 객체둜 두고 μžˆμœΌλ‚˜, 곡개된 DTO(ConfirmedPromiseResponseDTO)λŠ” fixedDate와 placeName을 μ΅œμƒμœ„ ν•„λ“œλ‘œ κ°€μ§‘λ‹ˆλ‹€. μ‹€μ œ API 연동 μ‹œ μ–΄λŒ‘ν„° λ˜λŠ” μ»΄ν¬λ„ŒνŠΈ prop ꡬ쑰 μ •ν•©μ„± 점검이 ν•„μš”ν•©λ‹ˆλ‹€.

연동 영ν–₯도 확인 μŠ€ν¬λ¦½νŠΈμž…λ‹ˆλ‹€(Confirmed DTO/νƒ€μž… μ‚¬μš©μ²˜ 점검):


🏁 Script executed:

#!/bin/bash
# Confirmed κ΄€λ ¨ DTO/νƒ€μž… μ‚¬μš© 지점 확인
set -euo pipefail

echo "== ConfirmedPromiseResponseDTO μ‚¬μš©μ²˜ =="
rg -n -C2 '\bConfirmedPromiseResponseDTO\b' api src

echo
echo "== PromiseStatus Confirmed 흐름 λ‚΄ fixedDate/placeName μ ‘κ·Ό μ—¬λΆ€ =="
rg -n -C3 '\bfixedDate\b|\bplaceName\b' src | sed -n '1,200p'

Length of output: 15465


MockUpConfirmed ꡬ쑰가 ConfirmedPromiseResponseDTO와 λΆˆμΌμΉ˜ν•©λ‹ˆλ‹€ β€” λͺ©μ—… 객체 μˆ˜μ • λ˜λŠ” μ–΄λŒ‘ν„° 적용 ν•„μš”

λͺ©μ—…μ—μ„œ

promisePlace: { placeName, placeAddress }
promiseAvailableTimes: { date, startTime, endTime }

λ₯Ό 쀑첩 객체둜 두고 μžˆμœΌλ‚˜, μ‹€μ œ ConfirmedPromiseResponseDTOλŠ” λ‹€μŒκ³Ό 같이 μ΅œμƒμœ„ ν•„λ“œλ‘œ μ •μ˜λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€:

interface ConfirmedPromiseResponseDTO {
  id: number;
  promiseName: string;
  fixedDate: string;      // YYYY-MM-DD
  placeName: string;
  placeAddress: string;
  startTime: string;      // HH:MM:SS
  endTime: string;        // HH:MM:SS
  promiseMembersNames: string[];
}

μ‹€μ œ API 연동 μ „, μ•„λž˜ λ‘˜ 쀑 ν•˜λ‚˜λ₯Ό 선택해 μΌμΉ˜μ‹œμΌœμ•Ό ν•©λ‹ˆλ‹€:

  • λͺ©μ—… 객체λ₯Ό DTO ν˜•νƒœμ— 맞좰 λ³€κ²½
  • λ„€νŠΈμ›Œν¬ 응닡을 μ–΄λŒ‘ν„°μ—μ„œ λ³€ν™˜ν•΄ μ»΄ν¬λ„ŒνŠΈμ— 전달

μˆ˜μ • μ˜ˆμ‹œ (src/pages/promiseStatus/mockUp.ts):

-import { mockUpConfirmed } from './mockUp';
+import type { ConfirmedPromiseResponseDTO } from 'api/data-contracts';

-export const mockUpConfirmed = {
-  promiseName: 'KUIT BARO 2차 회의',
-  promisePlace: {
-    placeName: '강남역 μŠ€νƒ€λ²…μŠ€',
-    placeAddress: 'μ„œμšΈνŠΉλ³„μ‹œ 강남ꡬ 역삼동 123-123',
-  },
-
-  promiseAvailableTimes: {
-    date: '2025-04-03',
-    startTime: '12:00:00',
-    endTime: '12:30:00',
-  },
-  promiseMembersNames: ['John Doe', 'Jane Doe', 'John Smith', 'Jane Smith'],
-};
+export const mockUpConfirmed: ConfirmedPromiseResponseDTO = {
+  id: 1,
+  promiseName: 'KUIT BARO 2차 회의',
+  fixedDate: '2025-04-03',
+  placeName: '강남역 μŠ€νƒ€λ²…μŠ€',
+  placeAddress: 'μ„œμšΈνŠΉλ³„μ‹œ 강남ꡬ 역삼동 123-123',
+  startTime: '12:00:00',
+  endTime: '12:30:00',
+  promiseMembersNames: ['John Doe', 'Jane Doe', 'John Smith', 'Jane Smith'],
+};
  • λŒ€μƒ 파일: src/pages/promiseStatus/mockUp.ts
  • μ°Έμ‘° νƒ€μž…: api/data-contracts.ts 의 ConfirmedPromiseResponseDTO
πŸ€– Prompt for AI Agents
In src/pages/promiseStatus/mockUp.ts around lines 125 to 138, the mock object
shape does not match ConfirmedPromiseResponseDTO; update the mock to match the
DTO or add an adapter β€” specifically, replace nested promisePlace and
promiseAvailableTimes with top-level fields: id (number), promiseName (string),
fixedDate (YYYY-MM-DD), placeName (string), placeAddress (string), startTime
(HH:MM:SS), endTime (HH:MM:SS), and keep promiseMembersNames as string[]; ensure
types/values conform to api/data-contracts.ts ConfirmedPromiseResponseDTO or
implement a small adapter function that converts the current nested mock into
the DTO shape before it’s consumed by components.

Loading