diff --git a/src/pages/DetailProgram/RecommendAccom.tsx b/src/pages/DetailProgram/RecommendAccom.tsx
index 5eac141..e5984e6 100644
--- a/src/pages/DetailProgram/RecommendAccom.tsx
+++ b/src/pages/DetailProgram/RecommendAccom.tsx
@@ -1,4 +1,3 @@
-import Loading from '@/components/Loading/Loading';
import RecommendCard from '@/components/RecommendCard/RecommendCard';
import { H1 } from '@/style/fonts/StyledFonts';
import { RecommendDataType } from '@/types';
@@ -6,20 +5,13 @@ import styled from 'styled-components';
interface RecommendAccomProps {
resultList: RecommendDataType[];
- isLoading: boolean;
}
-const RecommendAccom = ({ resultList, isLoading }: RecommendAccomProps) => {
+const RecommendAccom = ({ resultList }: RecommendAccomProps) => {
return (
숙소 추천
- {isLoading ? (
-
-
-
- ) : (
-
- )}
+
);
};
@@ -34,8 +26,3 @@ const Container = styled.div`
margin-bottom: 193px;
text-align: left;
`;
-
-const LoadingWrapper = styled.div`
- background-color: red;
- position: relative;
-`;
diff --git a/src/pages/DetailProgram/RecommendSpot.tsx b/src/pages/DetailProgram/RecommendSpot.tsx
index 15eb491..54035c7 100644
--- a/src/pages/DetailProgram/RecommendSpot.tsx
+++ b/src/pages/DetailProgram/RecommendSpot.tsx
@@ -1,4 +1,3 @@
-import Loading from '@/components/Loading/Loading';
import RecommendCard from '@/components/RecommendCard/RecommendCard';
import { H1 } from '@/style/fonts/StyledFonts';
import { RecommendDataType } from '@/types';
@@ -6,20 +5,13 @@ import styled from 'styled-components';
interface RecommendSpotProps {
resultList: RecommendDataType[];
- isLoading: boolean;
}
-const RecommendSpot = ({ resultList, isLoading }: RecommendSpotProps) => {
+const RecommendSpot = ({ resultList }: RecommendSpotProps) => {
return (
여행지 추천
- {isLoading ? (
-
-
-
- ) : (
-
- )}
+
);
};
@@ -34,8 +26,3 @@ const Container = styled.div`
padding-bottom: 16px;
text-align: left;
`;
-
-const LoadingWrapper = styled.div`
- background-color: red;
- position: relative;
-`;
diff --git a/src/pages/DetailProgram/index.tsx b/src/pages/DetailProgram/index.tsx
index 19f5726..abbd662 100644
--- a/src/pages/DetailProgram/index.tsx
+++ b/src/pages/DetailProgram/index.tsx
@@ -32,16 +32,14 @@ const DetailProgram = () => {
programId,
writerVersion,
});
- const { data: recommendSpotList, isLoading: spotListLoading } =
- useGetRegionTour({
- programId,
- writerVersion,
- });
- const { data: recommendAccomList, isLoading: accomListLoading } =
- useGetRegionLodgment({
- programId,
- writerVersion,
- });
+ const { data: recommendSpotList } = useGetRegionTour({
+ programId,
+ writerVersion,
+ });
+ const { data: recommendAccomList } = useGetRegionLodgment({
+ programId,
+ writerVersion,
+ });
const userInfo = useRecoilValue(UserAtom);
const navigate = useNavigate();
@@ -96,22 +94,12 @@ const DetailProgram = () => {
- 0
- ? recommendSpotList
- : []
- }
- isLoading={spotListLoading}
- />
- 0
- ? recommendAccomList
- : []
- }
- isLoading={accomListLoading}
- />
+ {recommendSpotList && recommendSpotList.length > 0 && (
+
+ )}
+ {recommendAccomList && recommendAccomList.length > 0 && (
+
+ )}