Skip to content

Commit ccbdb30

Browse files
authored
🎨 Add minor UI tweaks (#1506)
1 parent 2eb8f5b commit ccbdb30

File tree

5 files changed

+12
-17
lines changed

5 files changed

+12
-17
lines changed

frontend/src/components/Common/Navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function Navbar() {
2020
p={4}
2121
>
2222
<Link to="/">
23-
<Image src={Logo} alt="Logo" w="180px" maxW="2xs" px={2} />
23+
<Image src={Logo} alt="Logo" maxW="3xs" p={2} />
2424
</Link>
2525
<Flex gap={2} alignItems="center">
2626
<UserMenu />

frontend/src/components/Common/Sidebar.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ const Sidebar = () => {
2222
const { logout } = useAuth()
2323
const [open, setOpen] = useState(false)
2424

25-
const handleLogout = async () => {
26-
logout()
27-
}
28-
2925
return (
3026
<>
3127
{/* Mobile */}
@@ -48,15 +44,17 @@ const Sidebar = () => {
4844
<FaBars />
4945
</IconButton>
5046
</DrawerTrigger>
51-
<DrawerContent maxW="280px">
47+
<DrawerContent maxW="xs">
5248
<DrawerCloseTrigger />
5349
<DrawerBody>
5450
<Flex flexDir="column" justify="space-between">
5551
<Box>
5652
<SidebarItems />
5753
<Flex
5854
as="button"
59-
onClick={handleLogout}
55+
onClick={() => {
56+
logout()
57+
}}
6058
alignItems="center"
6159
gap={4}
6260
px={4}
@@ -67,7 +65,7 @@ const Sidebar = () => {
6765
</Flex>
6866
</Box>
6967
{currentUser?.email && (
70-
<Text fontSize="sm" p={2}>
68+
<Text fontSize="sm" p={2} truncate maxW="sm">
7169
Logged in as: {currentUser.email}
7270
</Text>
7371
)}
@@ -84,7 +82,7 @@ const Sidebar = () => {
8482
position="sticky"
8583
bg="bg.subtle"
8684
top={0}
87-
minW="280px"
85+
minW="xs"
8886
h="100vh"
8987
p={4}
9088
>

frontend/src/components/UserSettings/ChangePassword.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ const ChangePassword = () => {
4848
Change Password
4949
</Heading>
5050
<Box
51-
w={{ sm: "full", md: "300px" }}
5251
as="form"
5352
onSubmit={handleSubmit(onSubmit)}
5453
>
55-
<VStack gap={4}>
54+
<VStack gap={4} w={{ base: "100%", md: "sm" }}>
5655
<PasswordInput
5756
type="current_password"
5857
startElement={<FiLock />}

frontend/src/components/UserSettings/UserInformation.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const UserInformation = () => {
7676
User Information
7777
</Heading>
7878
<Box
79-
w={{ sm: "full", md: "50%" }}
79+
w={{ sm: "full", md: "sm" }}
8080
as="form"
8181
onSubmit={handleSubmit(onSubmit)}
8282
>
@@ -86,15 +86,14 @@ const UserInformation = () => {
8686
{...register("full_name", { maxLength: 30 })}
8787
type="text"
8888
size="md"
89-
w="auto"
9089
/>
9190
) : (
9291
<Text
9392
fontSize="md"
9493
py={2}
9594
color={!currentUser?.full_name ? "gray" : "inherit"}
9695
truncate
97-
maxWidth="250px"
96+
maxW="sm"
9897
>
9998
{currentUser?.full_name || "N/A"}
10099
</Text>
@@ -114,10 +113,9 @@ const UserInformation = () => {
114113
})}
115114
type="email"
116115
size="md"
117-
w="auto"
118116
/>
119117
) : (
120-
<Text fontSize="md" py={2} truncate maxWidth="250px">
118+
<Text fontSize="md" py={2} truncate maxW="sm">
121119
{currentUser?.email}
122120
</Text>
123121
)}

frontend/src/routes/_layout/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function Dashboard() {
1414
<>
1515
<Container maxW="full">
1616
<Box pt={12} m={4}>
17-
<Text fontSize="2xl">
17+
<Text fontSize="2xl" truncate maxW="sm">
1818
Hi, {currentUser?.full_name || currentUser?.email} 👋🏼
1919
</Text>
2020
<Text>Welcome back, nice to see you again!</Text>

0 commit comments

Comments
 (0)