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

[Feature]: 정회원 승급 시 와우클래스 바로가기 링크를 띄워줘요 #113

Merged
merged 2 commits into from
Sep 4, 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
11 changes: 8 additions & 3 deletions src/components/myPage/ApproveBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,21 @@ export const ApproveBox = ({
status: 'error'
},
REGULAR: {
title: '모든 가입 절차를 완료했어요.',
boxVariant: 'text',
title: 'WOW CLASS',
description:
'GDSC Hongik의 스터디 서비스인 WOW CLASS를 이용할 수 있어요.',
boxVariant: 'arrow',
status: 'success'
}
};

return (
<BoxWrapper
onClick={() => {
if (role === 'ASSOCIATE') handleBottomSheet();
else {
else if (role === 'REGULAR') {
window.location.href = 'https://study.gdschongik.com/';
} else {
return;
}
}}>
Expand Down
47 changes: 32 additions & 15 deletions src/components/myPage/JoinRegularMember.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { Text, Flex } from '@/components/common/Wrapper';
import RoutePath from '@/routes/routePath';
import { Status } from '@/types/status';
import { User } from '@/types/user';
import { useNavigate } from 'react-router-dom';
import Box from 'wowds-ui/Box';

const JoinRegularMember = ({ paymentStatus }: { paymentStatus: Status }) => {
const JoinRegularMember = ({
paymentStatus,
member
}: {
paymentStatus?: Status;
member: User;
}) => {
const navigate = useNavigate();

const handleClickRoute = () => {
Expand All @@ -23,20 +30,30 @@ const JoinRegularMember = ({ paymentStatus }: { paymentStatus: Status }) => {
<Text typo="h2" color="textBlack">
정회원 가입 조건
</Text>
<Box
text={
paymentStatus === 'UNSATISFIED'
? '이번 학기 회비를 납부해주세요.'
: '이번 학기 회비를 납부했어요.'
}
variant={paymentStatus === 'UNSATISFIED' ? 'arrow' : 'text'}
status={paymentStatus === 'UNSATISFIED' ? 'error' : 'success'}
subText={
paymentStatus === 'UNSATISFIED'
? '카드·계좌이체 등 여러 결제수단을 지원해요.'
: undefined
}
/>
{paymentStatus ? (
<Box
text={
paymentStatus === 'UNSATISFIED'
? '이번 학기 회비를 납부해주세요.'
: '이번 학기 회비를 납부했어요.'
}
variant={paymentStatus === 'UNSATISFIED' ? 'arrow' : 'text'}
status={paymentStatus === 'UNSATISFIED' ? 'error' : 'success'}
subText={
paymentStatus === 'UNSATISFIED'
? '카드·계좌이체 등 여러 결제수단을 지원해요.'
: undefined
}
/>
) : (
member.role === 'REGULAR' && (
<Box
text="이번 학기 회비를 납부했어요."
variant="text"
status="success"
/>
)
)}
</Flex>
);
};
Expand Down
7 changes: 5 additions & 2 deletions src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export const Dashboard = () => {

const { member, currentRecruitmentRound, currentMembership } = data;

console.log(data);

return (
<div style={{ height: '100%' }}>
<Wrapper direction="column" justify="flex-start">
Expand All @@ -43,9 +45,10 @@ export const Dashboard = () => {
member={member}
/>
</Flex>
{currentMembership && (
{(currentMembership || member.role === 'REGULAR') && (
<JoinRegularMember
paymentStatus={currentMembership.regularRequirement.paymentStatus}
member={member}
paymentStatus={currentMembership?.regularRequirement.paymentStatus}
/>
)}
<AssociateRequirementCheck
Expand Down
Loading