Skip to content

Commit

Permalink
fix(partners): add signout action in btn
Browse files Browse the repository at this point in the history
  • Loading branch information
joshxfi committed Aug 18, 2024
1 parent 3e1ade0 commit 0cdb924
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions apps/partners/src/app/dashboard/components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Link from "next/link";
import { Badge } from "@umamin/ui/components/badge";
import { logout } from "@/lib/actions";
import { SignOutButton } from "./sign-out-btn";
import { Badge } from "@umamin/ui/components/badge";

export async function Navbar() {
export function Navbar() {
return (
<nav className="fixed left-0 right-0 top-0 z-50 w-full bg-background bg-opacity-40 bg-clip-padding py-5 backdrop-blur-xl backdrop-filter lg:z-40 container max-w-screen-2xl flex justify-between items-center">
<div className="space-x-2 flex items-center">
Expand All @@ -15,7 +16,9 @@ export async function Navbar() {
<Badge variant="outline">beta</Badge>
</div>

<SignOutButton />
<form action={logout}>
<SignOutButton />
</form>
</nav>
);
}
2 changes: 1 addition & 1 deletion apps/partners/src/lib/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export async function login(_: any, formData: FormData): Promise<ActionResult> {
sessionCookie.attributes
);

return redirect("/inbox");
return redirect("/dashboard");
}

export async function updatePassword({
Expand Down

0 comments on commit 0cdb924

Please sign in to comment.