mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 18:05:11 +03:00
* Default to new organization layout + remove feature preview * Remove feature preview * Clean up LayoutUpdateBanner * Clean up * Fix * Fixy fix * Update comment * Nit to fix layout shift
24 lines
650 B
TypeScript
24 lines
650 B
TypeScript
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
|
|
import { useAppStateSnapshot } from 'state/app-state'
|
|
import { AiIconAnimation, Button } from 'ui'
|
|
|
|
export const AssistantButton = () => {
|
|
const snap = useAiAssistantStateSnapshot()
|
|
const { setEditorPanel } = useAppStateSnapshot()
|
|
|
|
return (
|
|
<Button
|
|
type="text"
|
|
size="tiny"
|
|
id="assistant-trigger"
|
|
className="w-[24px] h-[24px] flex items-center justify-center p-0"
|
|
onClick={() => {
|
|
snap.toggleAssistant()
|
|
setEditorPanel({ open: false })
|
|
}}
|
|
>
|
|
<AiIconAnimation allowHoverEffect size={16} />
|
|
</Button>
|
|
)
|
|
}
|