diff --git a/src/app/components/Icon.tsx b/src/app/components/Icon.tsx index 5bc6487..e7d4658 100644 --- a/src/app/components/Icon.tsx +++ b/src/app/components/Icon.tsx @@ -1,4 +1,5 @@ import { iconClassnameProps } from '@/types/component.ts'; +import Image from 'next/image'; export function GpsIcon({ className }: iconClassnameProps) { return ( @@ -71,3 +72,14 @@ export function CameraIcon({ className }: iconClassnameProps) { ); } + +export function Marker({ className }: iconClassnameProps) { +
+ +
; +} diff --git a/src/app/components/InfiniteScroll.tsx b/src/app/components/InfiniteScroll.tsx deleted file mode 100644 index 01b1475..0000000 --- a/src/app/components/InfiniteScroll.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable react-hooks/exhaustive-deps */ -/* eslint-disable consistent-return */ -/* eslint-disable comma-spacing */ -/* eslint-disable object-curly-newline */ -/* eslint-disable operator-linebreak */ -import React, { useEffect, useRef } from 'react'; -import { useInfiniteQuery } from '@tanstack/react-query'; - -const InfiniteScroll = ({ - queryKey, - queryFn, - renderItem, - getNextPageParam, - dataPath, -}: any) => { - const { data, isLoading, isError, fetchNextPage, hasNextPage } = - useInfiniteQuery({ - queryKey, - queryFn, - getNextPageParam, - initialPageParam: 0, - }); - - const loadMoreRef = useRef(null); - - useEffect(() => { - if (!hasNextPage) return; - const observer = new IntersectionObserver( - (entries) => { - if (entries[0].isIntersecting) { - fetchNextPage(); - } - }, - { - root: null, // 기본적으로 브라우저 뷰포트를 root로 사용 - rootMargin: '0px', - threshold: 0.1, // 타겟 요소가 10% 보이면 콜백 실행 - }, - ); - if (loadMoreRef.current) observer.observe(loadMoreRef.current); - - return () => { - if (loadMoreRef.current) observer.disconnect(); - }; - }, [hasNextPage, fetchNextPage]); - - return ( -
- {isLoading &&
Loading...
} - {isError &&
Error loading data
} - {data?.pages.map((page, pageIndex) => ( - - {dataPath(page).map((item: any) => renderItem(item))} - - ))} - {isLoading &&
Loading more items...
} -
-
- ); -}; - -export default InfiniteScroll; diff --git a/src/app/components/MannerStatBar.tsx b/src/app/components/MannerStatBar.tsx index 1932a9e..b3546c4 100644 --- a/src/app/components/MannerStatBar.tsx +++ b/src/app/components/MannerStatBar.tsx @@ -4,7 +4,7 @@ function MannerStatBar({ mannerStat }: { mannerStat: number }) { return (
-

매너스탯

+

매너스탯

{mannerStatTranslate(mannerStat)}

diff --git a/src/app/components/Post.tsx b/src/app/components/Post.tsx index 0a66efd..5f753b6 100644 --- a/src/app/components/Post.tsx +++ b/src/app/components/Post.tsx @@ -12,11 +12,11 @@ function Post({ titleImage, title, location, meetingId, endTime }: postProps) { className="m-4 flex cursor-pointer flex-col justify-center" href={`/meeting/${meetingId}`} > -
+
{titleImage} diff --git a/src/app/home/Body.tsx b/src/app/home/Body.tsx index d3779bb..5fa7030 100644 --- a/src/app/home/Body.tsx +++ b/src/app/home/Body.tsx @@ -213,7 +213,7 @@ function Distance() { position={{ lat: marker.lat, lng: marker.lng }} onClick={() => handleMain(marker)} image={{ - src: 'https://i.ibb.co/Cnwf3x8/image.png', + src: 'https://i.ibb.co/sCQvt3z/Group-2608599.png', size: { width: 64, height: 70 }, options: { offset: { x: 27, y: 69 } }, }} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index a8c0aa1..fd11d16 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -31,7 +31,9 @@ export default function RootLayout({ 로딩중인데요?ㅋㅋ
}>
-
{children}
+
+ {children} +