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

[온보딩] isToken 값 기본으로 false 설정을 제거하여 확인 #389

Merged
merged 1 commit into from
Feb 21, 2024
Merged
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
47 changes: 24 additions & 23 deletions src/pages/Participants/ParticipantsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@ const ParticipantsView = () => {
setIsToken(false);
console.log('로컬스토리지 확인', localStorage.getItem('EXIT_LOGIN_TOKEN'));
console.log('isTOken', isToken);
console.log('if');
} else {
console.log(
'else 로컬스토리지 확인(로컬스토리지 있어야함)',
localStorage.getItem('EXIT_LOGIN_TOKEN'),
);
setIsToken(true);
console.log('isTOken', isToken);
console.log('else');
}
}, [isToken]);

Expand Down Expand Up @@ -161,29 +163,28 @@ const ParticipantsView = () => {
</S.InfoWrapper>
{/* 수정된 부분 시작 */}
<S.BtnWrapper>
{isToken === true ? (
<>
<S.LinkCopyBtn
onClick={() =>
// handleCopyToClipboard(
// `http://sweetgift.vercel.app/result/${data.data.invitationCode}`,
// )
handleCopyToClipboard(`http://localhost:5173/result/${data.data.invitationCode}`)
}
>
<IcLink style={{ width: '1.8rem', height: '1.8rem' }} />
링크 복사
</S.LinkCopyBtn>
<S.KakaoLinkCopyBtn
onClick={() => useKakaoShare(data.data.invitationCode, data.data.gifteeName)}
>
<IcKakaoShare style={{ width: '1.8rem', height: '1.8rem' }} />
카카오톡 공유
</S.KakaoLinkCopyBtn>
</>
) : (
<IcKakoLarge onClick={() => window.location.replace(kakaoURL)} />
)}
<>
{isToken === false ? (
<IcKakoLarge onClick={() => window.location.replace(kakaoURL)} />
) : (
<>
<S.LinkCopyBtn
onClick={() =>
handleCopyToClipboard(`http://localhost:5173/result/${data.data.invitationCode}`)
}
>
<IcLink style={{ width: '1.8rem', height: '1.8rem' }} />
링크 복사
</S.LinkCopyBtn>
<S.KakaoLinkCopyBtn
onClick={() => useKakaoShare(data.data.invitationCode, data.data.gifteeName)}
>
<IcKakaoShare style={{ width: '1.8rem', height: '1.8rem' }} />
카카오톡 공유
</S.KakaoLinkCopyBtn>
</>
)}
</>
</S.BtnWrapper>
</>
);
Expand Down