feat: external Learning Hub toggle + applicant help button
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m52s
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>
This commit is contained in:
@@ -2,12 +2,17 @@
|
||||
|
||||
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',
|
||||
@@ -21,8 +26,9 @@ export function MentorNav({ user }: MentorNavProps) {
|
||||
},
|
||||
{
|
||||
name: 'Learning Hub',
|
||||
href: '/mentor/resources',
|
||||
href: useExternal ? flags.learningHubExternalUrl : '/mentor/resources',
|
||||
icon: BookOpen,
|
||||
external: !!useExternal,
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user