mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 09:50:33 -04:00
4a0bb36ca8
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { IS_PLATFORM } from 'common'
|
|
import { Activity, LifeBuoy } from 'lucide-react'
|
|
import { useMemo } from 'react'
|
|
import type { ICommand } from 'ui-patterns/CommandMenu'
|
|
import { useRegisterCommands } from 'ui-patterns/CommandMenu'
|
|
|
|
import { COMMAND_MENU_SECTIONS } from './CommandMenu.utils'
|
|
|
|
export const useSupportCommands = () => {
|
|
const commands = useMemo(
|
|
() =>
|
|
[
|
|
{
|
|
id: 'system-status',
|
|
name: 'View system status',
|
|
value: 'Support: View system status',
|
|
route: 'https://status.supabase.com',
|
|
icon: () => <Activity />,
|
|
},
|
|
{
|
|
id: 'discord-community',
|
|
name: 'Ask Discord community',
|
|
value: 'Support: Ask Discord community',
|
|
route: 'https://discord.supabase.com',
|
|
icon: () => <LifeBuoy />,
|
|
},
|
|
{
|
|
id: 'support-team',
|
|
name: 'Contact support',
|
|
value: 'Support: Contact support',
|
|
route: 'https://www.supabase.com/support',
|
|
icon: () => <LifeBuoy />,
|
|
},
|
|
] as Array<ICommand>,
|
|
[]
|
|
)
|
|
|
|
useRegisterCommands(COMMAND_MENU_SECTIONS.SUPPORT, commands, { enabled: IS_PLATFORM })
|
|
}
|