Skip to content

Commit b2477dd

Browse files
authored
Merge pull request #141 from starlight-dari/main
fix: 추억앨범 리스트 api 호출 오류 디버깅 추가해 수정 테스트 #59
2 parents c54d2b1 + a96a2e3 commit b2477dd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/context/AlbumContext.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ export const AlbumProvider: React.FC<{ children: ReactNode }> = ({
6363
const fetchPetList = useCallback(
6464
async (petId: number | null) => {
6565
try {
66+
console.log("fetchPetList 실행됨, petId:", petId);
67+
6668
const response = await axios.get(
6769
`http://${server_url}:8080/memory-album/status`,
6870
{ withCredentials: true }
@@ -110,9 +112,14 @@ export const AlbumProvider: React.FC<{ children: ReactNode }> = ({
110112
};
111113

112114
useEffect(() => {
115+
console.log("📢 초기 앨범 데이터 가져오는 중...");
113116
fetchPetList(null);
114117
}, []);
115118

119+
useEffect(() => {
120+
console.log("앨범 데이터 업데이트됨:", albumData);
121+
}, [albumData]);
122+
116123
useEffect(() => {
117124
if (selectedPet) {
118125
fetchPetAlbum(selectedPet.petId);

0 commit comments

Comments
 (0)