feat: The Other Dude v9.0.1 — full-featured email system

ci: add GitHub Pages deployment workflow for docs site

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-08 17:46:37 -05:00
commit b840047e19
511 changed files with 106948 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
import { useEffect } from 'react'
import { createFileRoute, useNavigate } from '@tanstack/react-router'
import { useQuery } from '@tanstack/react-query'
import { FleetDashboard } from '@/components/fleet/FleetDashboard'
import { CardGridSkeleton } from '@/components/ui/page-skeleton'
import { useAuth, isSuperAdmin } from '@/lib/auth'
import { tenantsApi } from '@/lib/api'
export const Route = createFileRoute('/_authenticated/')({
component: FleetDashboardPage,
})
function FleetDashboardPage() {
const { user } = useAuth()
const navigate = useNavigate()
// Only check for super_admin -- regular users always have a tenant
const shouldCheck = isSuperAdmin(user)
const { data: tenants, isLoading: tenantsLoading } = useQuery({
queryKey: ['tenants'],
queryFn: tenantsApi.list,
enabled: shouldCheck,
})
// Filter out the System (Internal) tenant — only real customer tenants count
const realTenants = tenants?.filter(
(t) => t.id !== '00000000-0000-0000-0000-000000000000',
)
useEffect(() => {
if (shouldCheck && !tenantsLoading && tenants && realTenants && realTenants.length === 0) {
void navigate({ to: '/setup' })
}
}, [shouldCheck, tenantsLoading, tenants, realTenants, navigate])
// Show skeleton while checking (super_admin only)
if (shouldCheck && tenantsLoading) {
return <CardGridSkeleton />
}
return <FleetDashboard />
}