mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55:06 +03:00
## Context Just cleaning up feature flags that have been toggled on for all users and unchanged for the past 2 months - advisorRules - newJwtSecrets - isWorkOSTPAEnabled - EnableOAuth21 - gitlessBranching - showRefreshToast - awsPrivateLinkIntegration - useBedrockAssistant (Already not used) - enableStripeSyncEngineIntegration - ShowExplainWithAiInQueryPerformance Doing it in 2 parts so its easier for review
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import { SIDEBAR_KEYS } from 'components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider'
|
|
import { ProductMenu } from 'components/ui/ProductMenu'
|
|
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
|
|
import { useSidebarManagerSnapshot } from 'state/sidebar-manager-state'
|
|
import { Badge, Button } from 'ui'
|
|
|
|
import { FeaturePreviewSidebarPanel } from '../../ui/FeaturePreviewSidebarPanel'
|
|
import { generateAdvisorsMenu } from './AdvisorsMenu.utils'
|
|
|
|
interface AdvisorsSidebarMenuProps {
|
|
page?: string
|
|
}
|
|
|
|
export function AdvisorsSidebarMenu({ page }: AdvisorsSidebarMenuProps) {
|
|
const { data: project } = useSelectedProjectQuery()
|
|
const { toggleSidebar } = useSidebarManagerSnapshot()
|
|
|
|
const handleOpenAdvisor = () => {
|
|
toggleSidebar(SIDEBAR_KEYS.ADVISOR_PANEL)
|
|
}
|
|
|
|
return (
|
|
<div className="pb-12 relative">
|
|
<FeaturePreviewSidebarPanel
|
|
className="mx-4 mt-4"
|
|
title="Moving to the toolbar"
|
|
description="Advisors are now available in the top toolbar for quicker access across the dashboard."
|
|
illustration={<Badge variant="success">New</Badge>}
|
|
actions={
|
|
<Button size="tiny" type="default" onClick={handleOpenAdvisor}>
|
|
Try it now
|
|
</Button>
|
|
}
|
|
/>
|
|
|
|
<ProductMenu page={page} menu={generateAdvisorsMenu(project)} />
|
|
</div>
|
|
)
|
|
}
|