Skip to content

Commit d9d6d86

Browse files
authored
⚒️ Add minor frontend tweaks (fastapi#1210)
1 parent ec17d77 commit d9d6d86

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

frontend/src/components/UserSettings/Appearance.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ const Appearance = () => {
2121
<Stack>
2222
{/* TODO: Add system default option */}
2323
<Radio value="light" colorScheme="teal">
24-
Light mode
24+
Light Mode
2525
<Badge ml="1" colorScheme="teal">
2626
Default
2727
</Badge>
2828
</Radio>
2929
<Radio value="dark" colorScheme="teal">
30-
Dark mode
30+
Dark Mode
3131
</Radio>
3232
</Stack>
3333
</RadioGroup>

frontend/src/components/UserSettings/ChangePassword.tsx

+7-3
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,18 @@ const ChangePassword = () => {
5353

5454
return (
5555
<>
56-
<Container maxW="full" as="form" onSubmit={handleSubmit(onSubmit)}>
56+
<Container maxW="full">
5757
<Heading size="sm" py={4}>
5858
Change Password
5959
</Heading>
60-
<Box w={{ sm: "full", md: "50%" }}>
60+
<Box
61+
w={{ sm: "full", md: "50%" }}
62+
as="form"
63+
onSubmit={handleSubmit(onSubmit)}
64+
>
6165
<FormControl isRequired isInvalid={!!errors.current_password}>
6266
<FormLabel color={color} htmlFor="current_password">
63-
Current password
67+
Current Password
6468
</FormLabel>
6569
<Input
6670
id="current_password"

frontend/src/components/UserSettings/UserInformation.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,15 @@ const UserInformation = () => {
7878

7979
return (
8080
<>
81-
<Container maxW="full" as="form" onSubmit={handleSubmit(onSubmit)}>
81+
<Container maxW="full">
8282
<Heading size="sm" py={4}>
8383
User Information
8484
</Heading>
85-
<Box w={{ sm: "full", md: "50%" }}>
85+
<Box
86+
w={{ sm: "full", md: "50%" }}
87+
as="form"
88+
onSubmit={handleSubmit(onSubmit)}
89+
>
8690
<FormControl>
8791
<FormLabel color={color} htmlFor="name">
8892
Full name

frontend/src/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export const confirmPasswordRules = (
3535
}
3636

3737
if (isRequired) {
38-
rules.required = "Password confirmation is required";
38+
rules.required = "Password confirmation is required"
3939
}
4040

41-
return rules;
41+
return rules
4242
}

0 commit comments

Comments
 (0)