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>
30 lines
761 B
TypeScript
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;
|
|
};
|