@@ -3,11 +3,6 @@ import React from 'react';
33import dynamic from 'next/dynamic' ;
44
55import NoMyInfoData from '@pages/myinfo/components/NoMyInfoData' ;
6- import { useInfiniteTechBlogData } from '@pages/techblog/api/useInfiniteTechBlog' ;
7- import {
8- MOBILE_MAIN_TECH_VIEW_SIZE ,
9- TECH_VIEW_SIZE ,
10- } from '@pages/techblog/constants/techBlogConstants' ;
116import { TechCardProps } from '@pages/techblog/types/techBlogType' ;
127
138import { useObserver } from '@hooks/useObserver' ;
@@ -20,34 +15,26 @@ import {
2015import { useMediaQueryContext } from '@/contexts/MediaQueryContext' ;
2116import { TechInfiniteDataType } from '@/types/infiniteQueryType' ;
2217
18+ import BookmarkComponent from '../techblog/BookmarkComponent' ;
2319import DesktopMainTechCard from '../techblog/desktopMainTechCard' ;
2420import GradientDiv from './gradientDiv' ;
2521
2622const DynamicTechCard = dynamic ( ( ) => import ( '@/pages/techblog/components/techCard' ) ) ;
2723
2824export default function DynamicTechBlogComponent ( {
25+ data,
2926 skeletonCnt,
3027 isScroll = true ,
31- bottomDiv,
3228 type = 'main' ,
33- // data,
3429} : {
30+ data : TechInfiniteDataType ;
3531 skeletonCnt : number ;
3632 isScroll ?: boolean ;
37- bottomDiv ?: React . MutableRefObject < null > ;
38- type : 'main' | 'myinfo' ;
39- data ?: TechInfiniteDataType ; //FIXME: 추후에 수정 필요
33+ type ?: 'main' | 'myinfo' ;
4034} ) {
4135 const { isMobile } = useMediaQueryContext ( ) ;
4236
43- const VIEW_SIZE = isMobile ? MOBILE_MAIN_TECH_VIEW_SIZE : TECH_VIEW_SIZE ;
44-
45- const data = useInfiniteTechBlogData (
46- 'LATEST' ,
47- undefined ,
48- undefined ,
49- VIEW_SIZE ,
50- ) as TechInfiniteDataType ;
37+ const bottomDiv = React . useRef ( null ) ;
5138
5239 const { techBlogData, isFetchingNextPage, hasNextPage, status, onIntersect } = data ;
5340
@@ -100,5 +87,19 @@ export default function DynamicTechBlogComponent({
10087 }
10188 } ;
10289
103- return < > { getStatusComponent ( ) } </ > ;
90+ return (
91+ < >
92+ { type === 'main' ? (
93+ < > { getStatusComponent ( ) } </ >
94+ ) : (
95+ < div className = 'flex flex-col gap-[2.4rem] pb-40' >
96+ < BookmarkComponent />
97+ < div >
98+ { getStatusComponent ( ) }
99+ < div ref = { bottomDiv } />
100+ </ div >
101+ </ div >
102+ ) }
103+ </ >
104+ ) ;
104105}
0 commit comments