Skip to content

Commit 30f15ae

Browse files
committed
chore: add toast on submit feedback
1 parent 7653fe1 commit 30f15ae

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/frontend/src/pages/AiBuilder/components/ChatInterface/ChatMessageToolbar.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
Textarea,
1919
useDisclosure,
2020
} from '@chakra-ui/react'
21+
import { useToast } from '@opengovsg/design-system-react'
2122

2223
interface ChatMessageToolbarProps {
2324
traceId: string
@@ -27,6 +28,7 @@ export default function ChatMessageToolbar({
2728
traceId,
2829
}: ChatMessageToolbarProps) {
2930
const { onOpen, onClose, isOpen } = useDisclosure()
31+
const toast = useToast()
3032
const firstFieldRef = React.useRef(null)
3133
const [comment, setComment] = useState('')
3234

@@ -50,6 +52,13 @@ export default function ChatMessageToolbar({
5052
} finally {
5153
onClose()
5254
setComment('')
55+
toast({
56+
title: "Thank you! We've sent your feeback to the Plumber team.",
57+
status: 'success',
58+
duration: 3000,
59+
isClosable: true,
60+
position: 'top',
61+
})
5362
}
5463
}
5564

0 commit comments

Comments
 (0)