mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
confirmed SSR support with Remix
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
} from "react-icons/tb";
|
||||
import { Button } from "ui";
|
||||
import { useAuth, useBknd } from "ui/client";
|
||||
import { useBkndWindowContext } from "ui/client/BkndProvider";
|
||||
import { useBkndSystemTheme } from "ui/client/schema/system/use-bknd-system";
|
||||
import { IconButton } from "ui/components/buttons/IconButton";
|
||||
import { Logo } from "ui/components/display/Logo";
|
||||
@@ -147,11 +148,12 @@ export function Header({ hasSidebar = true }) {
|
||||
function UserMenu() {
|
||||
const auth = useAuth();
|
||||
const [navigate] = useNavigate();
|
||||
const { logout_route } = useBkndWindowContext();
|
||||
|
||||
async function handleLogout() {
|
||||
await auth.logout();
|
||||
// @todo: grab from somewhere constant
|
||||
window.location.href = "/auth/logout";
|
||||
navigate(logout_route, { reload: true });
|
||||
}
|
||||
|
||||
async function handleLogin() {
|
||||
|
||||
Reference in New Issue
Block a user