Support.tsx39 lines · main
1import { IS_PLATFORM } from 'common'
2import { Activity, LifeBuoy } from 'lucide-react'
3import { useMemo } from 'react'
4import type { ICommand } from 'ui-patterns/CommandMenu'
5import { useRegisterCommands } from 'ui-patterns/CommandMenu'
6
7import { COMMAND_MENU_SECTIONS } from './CommandMenu.utils'
8
9export const useSupportCommands = () => {
10 const commands = useMemo(
11 () =>
12 [
13 {
14 id: 'system-status',
15 name: 'View system status',
16 value: 'Support: View system status',
17 route: 'https://status.supabase.com',
18 icon: () => <Activity />,
19 },
20 {
21 id: 'discord-community',
22 name: 'Ask Discord community',
23 value: 'Support: Ask Discord community',
24 route: 'https://discord.supabase.com',
25 icon: () => <LifeBuoy />,
26 },
27 {
28 id: 'support-team',
29 name: 'Contact support',
30 value: 'Support: Contact support',
31 route: 'https://www.supabase.com/support',
32 icon: () => <LifeBuoy />,
33 },
34 ] as Array<ICommand>,
35 []
36 )
37
38 useRegisterCommands(COMMAND_MENU_SECTIONS.SUPPORT, commands, { enabled: IS_PLATFORM })
39}