Refactor HomePage to use custom Button component; enhance login service to fetch user with full relations for improved data handling.

This commit is contained in:
2025-10-07 21:11:56 +05:00
parent dd75a73386
commit 4a44968b89
2 changed files with 9 additions and 3 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
import Button from "../components/ui/Button";
import { useMe, useLogout } from "../hooks/useAuth";
import { useNavigate } from "react-router";
@@ -70,13 +71,13 @@ function HomePage() {
</div>
)}
<button
<Button
onClick={handleLogout}
disabled={logoutMutation.isPending}
className="px-4 py-2 text-white bg-red-600 rounded-md hover:bg-red-700 disabled:opacity-50"
>
{logoutMutation.isPending ? "Выход..." : "Выйти"}
</button>
</Button>
</div>
</div>
</div>