Files
twenty/packages/twenty-front/src/modules/support/components/SupportButton.tsx
NitinPSingh 0fd3c8b264 Fix 6428/chat open on clicking dropdown (#6429)
This issue was caused due to last comomit on issue by me only
fix_6127/support_button_updated

I had fixed the chat opening problem , in this commit

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-07-29 17:41:33 +02:00

30 lines
761 B
TypeScript

import styled from '@emotion/styled';
import { IconHelpCircle } from 'twenty-ui';
import { SupportButtonSkeletonLoader } from '@/support/components/SupportButtonSkeletonLoader';
import { useSupportChat } from '@/support/hooks/useSupportChat';
import { Button } from '@/ui/input/button/components/Button';
const StyledButtonContainer = styled.div`
display: flex;
`;
export const SupportButton = () => {
const { loading, isFrontChatLoaded } = useSupportChat();
if (loading) {
return <SupportButtonSkeletonLoader />;
}
return isFrontChatLoaded ? (
<StyledButtonContainer>
<Button
variant="tertiary"
size="small"
title="Support"
Icon={IconHelpCircle}
/>
</StyledButtonContainer>
) : null;
};