feat: layout fix

This commit is contained in:
2024-02-23 23:57:14 +00:00
parent 735fa9354b
commit 8bb3d2bd84
14 changed files with 325 additions and 157 deletions
+3 -2
View File
@@ -12,9 +12,10 @@ import {
} from "../ui/dropdown-menu";
import { FaChevronDown } from "react-icons/fa";
import trpc from "~/lib/trpc";
import { usePageContext } from "~/renderer/context";
const Navbar = () => {
const { user } = useAuth();
const {user, urlPathname } = usePageContext();
const logout = trpc.auth.logout.useMutation({
onSuccess() {
window.location.reload();
@@ -51,7 +52,7 @@ const Navbar = () => {
</DropdownMenuContent>
</DropdownMenu>
) : (
<Button>Log in</Button>
<Button href={"/auth/login?return=" + urlPathname}>Log in</Button>
)}
</div>
</div>