Force desktop frame via useFrameViewport hook in Layout — applies to all pages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-21 09:05:30 +00:00
parent 8c6a79f222
commit ba23d59b3d
2 changed files with 25 additions and 0 deletions

View file

@ -2,6 +2,7 @@ import { NavLink } from 'react-router-dom'
import { CalendarClock, Settings, LogOut } from 'lucide-react'
import { can } from '../types'
import type { User } from '../types'
import { useFrameViewport } from '../hooks/useFrameViewport'
interface Props {
user: User
@ -9,6 +10,8 @@ interface Props {
}
export function Layout({ user, children }: Props) {
useFrameViewport('desktop')
async function logout() {
await fetch('/api/auth/logout', { method: 'POST', credentials: 'include' })
window.location.href = '/'