Skip to content

Commit

Permalink
🔨 chore: minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Mar 19, 2022
1 parent 73fd05f commit 134663a
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions packages/client/src/pages/admin/manage/users/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,25 +107,25 @@ export default function ManageCitizens(props: Props) {
<Formik validate={validate} onSubmit={onSubmit} initialValues={INITIAL_VALUES}>
{({ handleChange, handleSubmit, setFieldValue, isValid, values, errors }) => (
<form onSubmit={handleSubmit}>
<FormField errorMessage={errors.rank} label="Rank">
<Select
name="rank"
onChange={handleChange}
disabled={isRankDisabled}
value={values.rank}
values={
isRankDisabled
? [{ value: user.rank, label: user.rank }]
: [
{ value: "ADMIN", label: "Admin" },
{ value: "USER", label: "User" },
]
}
/>
</FormField>

{values.useOldPerms ? (
<>
<FormField errorMessage={errors.rank} label="Rank">
<Select
name="rank"
onChange={handleChange}
disabled={isRankDisabled}
value={values.rank}
values={
isRankDisabled
? [{ value: user.rank, label: user.rank }]
: [
{ value: "ADMIN", label: "Admin" },
{ value: "USER", label: "User" },
]
}
/>
</FormField>

<FormRow flexLike className="mt-5">
<FormField errorMessage={errors.isLeo} label="Leo Access">
<Toggle name="isLeo" onClick={handleChange} toggled={values.isLeo} />
Expand Down

0 comments on commit 134663a

Please sign in to comment.