Skip to content

Commit

Permalink
chore: 이메일 마스킹 코드 제거 (#1453)
Browse files Browse the repository at this point in the history
Co-authored-by: solar3070 <>
  • Loading branch information
solar3070 authored Jun 29, 2024
1 parent ab3596c commit b0b83cd
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 27 deletions.
2 changes: 0 additions & 2 deletions src/api/endpoint_LEGACY/members/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export type ProfileDetail = {
allowOfficial: boolean;
isMine: boolean;
isPhoneBlind: boolean;
isEmailBlind: boolean;
};

export type SoptActivity = {
Expand Down Expand Up @@ -152,7 +151,6 @@ export interface ProfileRequest {
};
selfIntroduction: string | null;
isPhoneBlind: boolean | null;
isEmailBlind: boolean | null;
}

export interface PostMemberMessageVariables {
Expand Down
18 changes: 0 additions & 18 deletions src/components/members/upload/FormSection/Basic/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@ export default function MemberBasicFormSection() {
);
};

const openMaskingEmailModal = () => {
return openMaskingModal(
'이메일을 숨기시겠어요?',
<StyledMaskingModalDesc>
<li>내 프로필에 이메일이 노출되지 않아요!</li>
<li>이메일을 숨겨도 쪽지는 전달될 수 있어요.</li>
<li>이메일을 숨겨도 동일 모임장, 임원진, 메이커스 운영진은 해당 정보를 확인할 수 있어요.</li>
</StyledMaskingModalDesc>,
);
};

const handleBlind = async (e: MouseEvent, name: keyof MemberUploadForm, openModal: () => Promise<boolean>) => {
if (getValues(name)) {
setValue(name, false);
Expand Down Expand Up @@ -124,13 +113,6 @@ export default function MemberBasicFormSection() {
<StyledInput {...register('phone')} placeholder='010-XXXX-XXXX' />
</FormItem>
<FormItem title='이메일' required errorMessage={errors.email?.message} className='maskable'>
<StyledBlindSwitch>
<StyledBlindSwitchTitle>정보 숨기기</StyledBlindSwitchTitle>
<Switch
{...register('isEmailBlind')}
onClick={(e) => handleBlind(e, 'isEmailBlind', openMaskingEmailModal)}
/>
</StyledBlindSwitch>
<StyledInput {...register('email')} type='email' placeholder='이메일 입력' />
</FormItem>
<FormItem
Expand Down
1 change: 0 additions & 1 deletion src/components/members/upload/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const MEMBER_DEFAULT_VALUES: DefaultValues<MemberUploadForm> = {
activities: [DEFAULT_ACTIVITY],
allowOfficial: false,
isPhoneBlind: false,
isEmailBlind: false,
careers: [DEFAULT_CAREER],
mbti: null,
favor: { peach: null, alcohol: null, fishBread: null, tteokbokki: null, sweetAndSourPork: null, mintChocolate: null },
Expand Down
1 change: 0 additions & 1 deletion src/components/members/upload/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export interface MemberUploadForm {
interest: string;
longIntroduction: string;
isPhoneBlind: boolean;
isEmailBlind: boolean;
}

export interface SoptActivity {
Expand Down
3 changes: 0 additions & 3 deletions src/pages/members/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export default function MemberEditPage() {
mbtiDescription,
interest,
isPhoneBlind,
isEmailBlind,
} = formData;

const requestBody: ProfileRequest = {
Expand Down Expand Up @@ -132,7 +131,6 @@ export default function MemberEditPage() {
isRiceTteokLover: favor.tteokbokki === null ? null : favor.tteokbokki === '쌀떡',
},
selfIntroduction: longIntroduction,
isEmailBlind,
isPhoneBlind,
};

Expand Down Expand Up @@ -171,7 +169,6 @@ export default function MemberEditPage() {
})),
allowOfficial: myProfile.allowOfficial,
isPhoneBlind: myProfile.isPhoneBlind,
isEmailBlind: myProfile.isEmailBlind,
profileImage: myProfile.profileImage,
careers: myProfile.careers.length
? myProfile.careers.map((career) =>
Expand Down
2 changes: 0 additions & 2 deletions src/pages/members/upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export default function MemberUploadPage() {
allowOfficial,
mbtiDescription,
interest,
isEmailBlind,
isPhoneBlind,
} = formData;

Expand Down Expand Up @@ -102,7 +101,6 @@ export default function MemberUploadPage() {
isRiceTteokLover: favor.tteokbokki === null ? null : favor.tteokbokki === '쌀떡',
},
selfIntroduction: longIntroduction,
isEmailBlind,
isPhoneBlind,
};

Expand Down

0 comments on commit b0b83cd

Please sign in to comment.