Skip to content

Commit

Permalink
cleanup repeat check in user-form
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmh0901 committed Mar 12, 2024
1 parent 4d6d990 commit 652e1fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/components/user-form/user-form-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ interface IProps {
mode: UserFormMode;
field: ProfileField;
value: string;
isAdmin?: boolean;
isPrivacy?: boolean;
isSelfForm?: boolean;
}
Expand Down Expand Up @@ -56,9 +55,8 @@ const OpenDatePicker = async () => {
<template>
<IonItem
v-if="
(!isAdmin && !field.isPrivacy && !isPrivacy) ||
(isAdmin && !field.isPrivacy && !isPrivacy) ||
(isAdmin && field.isPrivacy && isPrivacy) ||
(!field.isPrivacy && !isPrivacy) ||
(field.isPrivacy && isPrivacy) ||
isSelfForm
"
lines="none"
Expand Down
1 change: 0 additions & 1 deletion src/components/user-form/user-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const onCancel = () => {
:field="field"
:mode="mode"
:value="form[field.key] as string"
:is-admin="isAdmin"
:is-privacy="isPrivacy"
:is-self-form="isSelfForm"
@change="
Expand Down

0 comments on commit 652e1fa

Please sign in to comment.