Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA : 온보딩 페이지 디자인 QA 반영 #28

Merged
merged 3 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/ListTap/MainListTap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ const DigestTabOverlay = ({ data }: TabOverlayProps) => {
className='absolute z-50 p-4 m-2 text-body2'
>
{data.map(group => (
<div className='pb-2'>{group.name}</div>
<div key={group.name} className='pb-2'>
{group.name}
</div>
))}
<div className='flex justify-end w-full cursor-pointer text-body2 text-blue' onClick={handleGroupMake}>
+ 뉴스레터 그룹 만들기
Expand Down
30 changes: 20 additions & 10 deletions src/components/PageInteraction/Onboard/EmailListInteraction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const EmailListInteraction = ({ incomingSenders }: EmailListInteractionProps) =>
const router = useRouter();
const subscribtionMutation = useSubscribtionMutation();
const isReady = selectedEmailList.length > 0;
const [isFirst, setIsFirst] = useState(true);

useEffect(() => {
// Initialize the set with unique email addresses from incomingSenders
Expand All @@ -44,7 +45,7 @@ const EmailListInteraction = ({ incomingSenders }: EmailListInteractionProps) =>
};

const handleSelectAll = () => {
if (selectedEmailList.length === incomingSenders.senders.length) {
if (selectedEmailList.length === emailSet.size) {
setSelectedEmailList([]);
return;
}
Expand All @@ -65,6 +66,7 @@ const EmailListInteraction = ({ incomingSenders }: EmailListInteractionProps) =>
incomingSenders.senders.find(sender => sender.from.address === Array.from(emailSet)[currentIndex + 1])!,
);
}
setIsFirst(false);
};

// Function to handle navigating to the next email
Expand Down Expand Up @@ -128,7 +130,7 @@ const EmailListInteraction = ({ incomingSenders }: EmailListInteractionProps) =>
<span className='text-darkgrey'> 뉴스레터에요.</span>
</span>
<span className='cursor-pointer text-blue' onClick={handleSelectAll}>
전체선택
{selectedEmailList.length === emailSet.size ? '전체 해제' : '전체 선택'}
</span>
</span>
<div className='flex flex-col h-full gap-2 overflow-auto noScrollbar'>
Expand Down Expand Up @@ -175,14 +177,22 @@ const EmailListInteraction = ({ incomingSenders }: EmailListInteractionProps) =>
onClick={handleNextArticle}
className='cursor-pointer'
/>
<FoldIconWithDirection
width={24}
height={24}
rotate='down'
fill={hasPrevArticle ? '#797979' : '#DBDBDB'}
onClick={handlePrevArticle}
className='cursor-pointer'
/>
<div className='relative'>
<FoldIconWithDirection
width={24}
height={24}
rotate='down'
fill={hasPrevArticle ? '#797979' : '#DBDBDB'}
onClick={handlePrevArticle}
className='cursor-pointer'
/>
{isFirst && (
<div className='absolute flex top-[calc(100%+4px)] -left-1 w-[69px] p-2 text-xs font-normal text-white bg-black rounded-lg -tracking-[0.48px] '>
다음 발신인
<div className='absolute bottom-full left-3 w-0 h-0 border-b-[4px] border-b-black border-x-[4px] border-x-transparent'></div>
</div>
)}
</div>
</span>
</span>
<SubscribeButton
Expand Down
Loading