Skip to content

Commit 923569d

Browse files
committed
fix: remove unnecessary styling
1 parent cd14584 commit 923569d

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/components/presentation/logout-button.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export function LogoutButton() {
4242
onClick={() => toast.promise(mutateAsync(null), getToastMessages.logout)}
4343
disabled={isPending}
4444
variant="destructive"
45+
className="cursor-pointer"
4546
>
4647
<LogOut className="size-4" />
4748
<span>Wyloguj się</span>

src/components/presentation/navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function UserProfileMenu({ user }: { user: User | null }) {
6262
<>
6363
<DropdownMenuSeparator />
6464
<DropdownMenuItem asChild>
65-
<Link href="/change-password" className="block w-full">
65+
<Link href="/change-password" className="cursor-pointer">
6666
<KeyRound />
6767
Zmiana hasła
6868
</Link>

src/features/password-change/components/change-password-form.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ function handleServerValidationErrors(error: unknown): boolean {
3131
}
3232
for (const issue of validationIssues) {
3333
const fieldName = issue.field ?? issue.rule;
34-
if (fieldName === "oldPassword") {
34+
const refersToOldPassword =
35+
fieldName === "oldPassword" ||
36+
Object.keys(issue).includes("oldPassword") ||
37+
Object.values(issue).includes("oldPassword");
38+
if (refersToOldPassword) {
3539
toast.error(getToastMessages.changePassword.invalidOldPassword);
3640
return true;
3741
}

0 commit comments

Comments
 (0)