Files
supabase/apps/studio/components/layouts/AppLayout/AssistantButton.tsx
T
Joshen Lim fd98a08a4f Chore/default to new organization layout (#35515)
* 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
2025-05-13 11:25:35 +08:00

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>
)
}