Skip to content

Commit

Permalink
change naming
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-salgado committed Apr 2, 2024
1 parent 584057f commit 42648d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions apps/member-profile/app/routes/_profile.profile.emails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
ProfileTitle,
} from '../shared/components/profile';

import { AllowEmailShareFieldComponent } from '../shared/components/profile.personal';
import { AllowEmailShareField } from '../shared/components/profile.personal';

import { Route } from '../shared/constants';
import { db } from '../shared/core.server';
Expand Down Expand Up @@ -58,7 +58,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
}

const UpdateAllowEmailShare = z.object({
AllowEmailShareField: z.preprocess((value) => value === '1', z.boolean()),
AllowEmailShare: z.preprocess((value) => value === '1', z.boolean()),
});

type UpdateAllowEmailShare = z.infer<typeof UpdateAllowEmailShare>;
Expand All @@ -81,7 +81,7 @@ export async function action({ request }: ActionFunctionArgs) {
}

await db.transaction().execute(async (trx) => {
await updateAllowEmailShare(trx, user(session), data.AllowEmailShareField);
await updateAllowEmailShare(trx, user(session), data.AllowEmailShare);
});

toast(session, {
Expand All @@ -102,7 +102,7 @@ export async function action({ request }: ActionFunctionArgs) {
);
}

const { AllowEmailShareField } = UpdateAllowEmailShare.keyof().enum;
const { AllowEmailShare } = UpdateAllowEmailShare.keyof().enum;

export default function EmailsPage() {
return (
Expand Down Expand Up @@ -165,10 +165,10 @@ function EmailAddressSection() {
);
})}
</ul>
<AllowEmailShareFieldComponent
<AllowEmailShareField
defaultValue={student.allowEmailShare}
error={errors.AllowEmailShareField}
name={AllowEmailShareField}
error={errors.AllowEmailShare}
name={AllowEmailShare}
/>
<Button.Group>
<Button onClick={onAddEmail} size="small" variant="secondary">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Country } from '../core.ui';
import { CityCombobox, CityComboboxProps } from './city-combobox';
import { EthnicityMultiCombobox } from './ethnicity-combobox';

export function AllowEmailShareFieldComponent({
export function AllowEmailShareField({
defaultValue,
error,
name,
Expand All @@ -14,7 +14,7 @@ export function AllowEmailShareFieldComponent({
<Form.Field error={error}>
<Checkbox
defaultChecked={defaultValue}
label="Share my primary email with Chapter Leaders 🌟 "
label="Share my email with Chapter Leaders! 🌟 "
name={name}
value="1"
/>
Expand Down

0 comments on commit 42648d2

Please sign in to comment.