Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* getIsDevelopment 로직 변경

* 마감 컨펌 메세지 수정 (SWYP-team-2th#177)

* 메타 데이터를 추가한다. (SWYP-team-2th#179)

* 게시물 여러개일 경우,  모든게시물이 다 안나옴 (SWYP-team-2th#180)

---------

Co-authored-by: 정찬영 <[email protected]>
  • Loading branch information
YOOJS1205 and Jeongchanyeong committed Mar 2, 2025
1 parent dae72d9 commit e3909c8
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 52 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/fabicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
property="og:image"
content="https://image.photopic.site/images-dev/202502272107360.jpg"
/>
<title>Vite + React + TS</title>
<title>뽀또픽</title>
</head>
<body>
<div id="root"></div>
Expand Down
15 changes: 15 additions & 0 deletions public/fabicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

52 changes: 27 additions & 25 deletions src/components/my/Profile/VoteList/MyVoteList/MyVoteList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,33 @@ export default function MyVoteList() {
}

return (
<div className="grid grid-cols-3 gap-2">
{myVoteList.map((vote) => (
<Link
to={`/votes/${vote.shareUrl}`}
key={vote.id}
className="relative aspect-[71/106] rounded-xl"
>
<img
src={vote.bestPickedImageUrl}
className="w-full h-full object-cover"
/>
<Icon
name="Link"
size="medium"
onClick={(e) => {
e.preventDefault();
handleClickVoteShare({
author: author ?? '',
shareUrl: `${window.location.origin}/votes/${vote.shareUrl}`,
});
}}
className="absolute top-2 right-2 rounded-[10px] bg-gray-300 w-[26px] h-[26px] flex items-center justify-center"
/>
</Link>
))}
<div className="pb-6">
<div className="grid grid-cols-3 gap-2">
{myVoteList.map((vote) => (
<Link
to={`/votes/${vote.shareUrl}`}
key={vote.id}
className="relative aspect-[71/106] rounded-xl overflow-hidden"
>
<img
src={vote.bestPickedImageUrl}
className="w-full h-full object-cover"
/>
<Icon
name="Link"
size="medium"
onClick={(e) => {
e.preventDefault();
handleClickVoteShare({
author: author ?? '',
shareUrl: `${window.location.origin}/votes/${vote.shareUrl}`,
});
}}
className="absolute top-2 right-2 rounded-[10px] bg-gray-300 w-[26px] h-[26px] flex items-center justify-center"
/>
</Link>
))}
</div>
<div ref={observerRef} style={{ height: '10px' }} />
</div>
);
Expand Down
3 changes: 2 additions & 1 deletion src/components/my/Profile/VoteList/MyVoteList/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ export default function useMyVoteList() {
const myVoteList = data?.pages.flatMap((page) => page.data) ?? [];

useEffect(() => {
const scrollContainer = document.querySelector('.overflow-y-auto');
const observer = new IntersectionObserver(
(entries) => {
if (entries[0].isIntersecting && hasNextPage && !isFetchingNextPage) {
fetchNextPage();
}
},
{ threshold: 0.1 },
{ root: scrollContainer, threshold: 0.1 },
);

const currentObserver = observerRef.current;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,26 @@ export default function MyVoteList() {
}

return (
<div className="overflow-scroll grid grid-cols-3 gap-2">
{participatedVoteList.map((vote) => (
<Link
to={`/votes/${vote.shareUrl}`}
key={vote.id}
className="relative aspect-[71/106] rounded-xl overflow-hidden"
>
<img
src={vote.bestPickedImageUrl}
className="w-full h-full object-cover"
/>
<Icon
name="Link"
size="medium"
className="absolute top-2 right-2 rounded-[10px] bg-gray-300 w-[26px] h-[26px] flex items-center justify-center"
/>
</Link>
))}
<div className="pb-6">
<div className="overflow-scroll grid grid-cols-3 gap-2">
{participatedVoteList.map((vote) => (
<Link
to={`/votes/${vote.shareUrl}`}
key={vote.id}
className="relative aspect-[71/106] rounded-xl overflow-hidden"
>
<img
src={vote.bestPickedImageUrl}
className="w-full h-full object-cover"
/>
<Icon
name="Link"
size="medium"
className="absolute top-2 right-2 rounded-[10px] bg-gray-300 w-[26px] h-[26px] flex items-center justify-center"
/>
</Link>
))}
</div>
<div ref={observerRef} style={{ height: '10px' }} />
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/my/Profile/VoteList/VoteList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export default function VoteList() {
};

return (
<div className="flex flex-col gap-6 w-full h-full">
<div className="flex flex-col gap-6 w-full h-full flex-1 min-h-0">
<Tab selectedTab={tab} onClickTabMenu={handleClickTabMenu} />
<div className="overflow-y-auto">
<div className="overflow-y-auto flex-1 min-h-0">
<Suspense fallback={<Loading />}>
{tab === 'my' && <MyVoteList />}
</Suspense>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function CloseConfirmDialog({

return (
<Dialog
title="투표를 정말 무효처리 하시겠어요? 😢"
title="투표를 마감 하시겠습니까?✌️"
description={description ?? '삭제하면 다시 되돌릴 수 없어요!'}
cancelButtonProps={{
text: '취소',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function useVoteVerticalEllipsis() {
postId={voteDetail.id}
description={
notParticipatedVote
? '잠시만요️, 아직 아무도 투표하지 않았어요!😢'
? '잠시만요️, 아직 아무도 투표하지 않았어요!😢'
: '삭제하면 다시 되돌릴 수 없어요!'
}
/>,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/my/MyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function MyPage() {
/>
}
/>
<div className="pt-[105px] px-6 w-full h-full flex flex-col gap-[30px]">
<div className="pt-[105px] px-6 w-full h-full flex flex-col gap-[30px] flex-1 min-h-0">
<Suspense fallback={<Loading className="h-[100px]" />}>
<Profile />
</Suspense>
Expand Down

0 comments on commit e3909c8

Please sign in to comment.