mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
23 lines
638 B
TypeScript
23 lines
638 B
TypeScript
import {useRef} from 'react';
|
|
|
|
import {Button} from 'sentry/components/button';
|
|
import useFeedbackWidget from 'sentry/components/feedback/widget/useFeedbackWidget';
|
|
import {IconMegaphone} from 'sentry/icons/iconMegaphone';
|
|
import {t} from 'sentry/locale';
|
|
|
|
export default function FeedbackWidgetButton() {
|
|
const buttonRef = useRef<HTMLButtonElement>(null);
|
|
const feedback = useFeedbackWidget({buttonRef});
|
|
|
|
// Do not show button if Feedback integration is not enabled
|
|
if (!feedback) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Button ref={buttonRef} size="sm" icon={<IconMegaphone />}>
|
|
{t('Give Feedback')}
|
|
</Button>
|
|
);
|
|
}
|