All checks were successful
Build and Push Docker Image / build (push) Successful in 8m52s
- Add admin settings: learning_hub_external, learning_hub_external_url, support_email - Jury/Mentor nav respects external Learning Hub URL (opens in new tab) - RoleNav supports external nav items with ExternalLink icon - Applicant header shows Help button with configurable support email - Settings update mutation now upserts (creates on first use) - Shared inferSettingCategory for consistent category assignment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
1009 B
TypeScript
44 lines
1009 B
TypeScript
'use client'
|
|
|
|
import { BookOpen, Home, Users } from 'lucide-react'
|
|
import { RoleNav, type NavItem, type RoleNavUser } from '@/components/layouts/role-nav'
|
|
import { trpc } from '@/lib/trpc/client'
|
|
|
|
interface MentorNavProps {
|
|
user: RoleNavUser
|
|
}
|
|
|
|
export function MentorNav({ user }: MentorNavProps) {
|
|
const { data: flags } = trpc.settings.getFeatureFlags.useQuery()
|
|
|
|
const useExternal = flags?.learningHubExternal && flags.learningHubExternalUrl
|
|
|
|
const navigation: NavItem[] = [
|
|
{
|
|
name: 'Dashboard',
|
|
href: '/mentor',
|
|
icon: Home,
|
|
},
|
|
{
|
|
name: 'My Projects',
|
|
href: '/mentor/projects',
|
|
icon: Users,
|
|
},
|
|
{
|
|
name: 'Learning Hub',
|
|
href: useExternal ? flags.learningHubExternalUrl : '/mentor/resources',
|
|
icon: BookOpen,
|
|
external: !!useExternal,
|
|
},
|
|
]
|
|
|
|
return (
|
|
<RoleNav
|
|
navigation={navigation}
|
|
roleName="Mentor"
|
|
user={user}
|
|
basePath="/mentor"
|
|
/>
|
|
)
|
|
}
|