Skip to content

Commit

Permalink
fix: Missing padding on Omnichannel contacts Contextualbar loading …
Browse files Browse the repository at this point in the history
…state (#29379)
  • Loading branch information
Kishn0109 committed Aug 25, 2023
1 parent 81c4d9f commit c536a4a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/wet-frogs-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

fix: Missing padding on Omnichannel contacts Contextualbar loading state
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box } from '@rocket.chat/fuselage';
import { Box, ContextualbarContent } from '@rocket.chat/fuselage';
import { useTranslation } from '@rocket.chat/ui-contexts';
import React, { useMemo } from 'react';

Expand All @@ -16,7 +16,11 @@ function ContactEditWithData({ id, close }) {
} = useEndpointData('/v1/omnichannel/contact', { params: useMemo(() => ({ contactId: id }), [id]) });

if ([state].includes(AsyncStatePhase.LOADING)) {
return <FormSkeleton />;
return (
<ContextualbarContent>
<FormSkeleton />
</ContextualbarContent>
);
}

if (error || !data || !data.contact) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ILivechatVisitor, Serialized } from '@rocket.chat/core-typings';
import { Field, TextInput, ButtonGroup, Button } from '@rocket.chat/fuselage';
import { Field, TextInput, ButtonGroup, Button, ContextualbarContent } from '@rocket.chat/fuselage';
import { CustomFieldsForm } from '@rocket.chat/ui-client';
import { useToastMessageDispatch, useEndpoint, useTranslation } from '@rocket.chat/ui-contexts';
import { useQueryClient } from '@tanstack/react-query';
Expand Down Expand Up @@ -178,7 +178,11 @@ const ContactNewEdit = ({ id, data, close }: ContactNewEditProps): ReactElement
};

if (isLoadingCustomFields) {
return <FormSkeleton />;
return (
<ContextualbarContent>
<FormSkeleton />
</ContextualbarContent>
);
}

return (
Expand Down

0 comments on commit c536a4a

Please sign in to comment.