Skip to content

Commit d3fea10

Browse files
committed
Fix: Home 전체 게시글 조회 에러 모달 제거
1 parent d459005 commit d3fea10

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

src/pages/Home/OOTD/index.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ import { useState, useEffect, useRef } from 'react';
33
import debounce from 'lodash/debounce';
44

55
import { getPostListApi } from '@apis/post';
6-
import { handleError } from '@apis/util/handleError';
7-
8-
import Modal from '@components/Modal';
96

107
import type { PostSummary } from '@apis/post/dto';
11-
import type { ModalProps } from '@components/Modal/dto';
128

139
import Feed from './Feed/index';
1410

@@ -17,9 +13,6 @@ import { OOTDContainer, FeedContainer } from './styles';
1713
const OOTD: React.FC = () => {
1814
const [feeds, setFeeds] = useState<PostSummary[]>([]);
1915

20-
const [modalContent, setModalContent] = useState('알 수 없는 오류입니다.\n관리자에게 문의해 주세요.');
21-
const [isStatusModalOpen, setIsStatusModalOpen] = useState(false);
22-
2316
const isFetchingRef = useRef(false);
2417
const isReachedEndRef = useRef(false);
2518
const feedPageRef = useRef(1);
@@ -51,10 +44,6 @@ const OOTD: React.FC = () => {
5144
feedPageRef.current += 1;
5245
}
5346
}
54-
} catch (error) {
55-
const errorMessage = handleError(error);
56-
setModalContent(errorMessage);
57-
setIsStatusModalOpen(true);
5847
} finally {
5948
isFetchingRef.current = false;
6049
console.log(feeds);
@@ -109,13 +98,6 @@ const OOTD: React.FC = () => {
10998
};
11099
}, []);
111100

112-
const statusModalProps: ModalProps = {
113-
content: modalContent,
114-
onClose: () => {
115-
setIsStatusModalOpen(false);
116-
},
117-
};
118-
119101
return (
120102
<OOTDContainer>
121103
<FeedContainer>
@@ -127,7 +109,6 @@ const OOTD: React.FC = () => {
127109
{/* Intersection Observer가 감지할 마지막 요소 */}
128110
<div ref={loadMoreRef} />
129111
</FeedContainer>
130-
{isStatusModalOpen && <Modal {...statusModalProps} />}
131112
</OOTDContainer>
132113
);
133114
};

0 commit comments

Comments
 (0)