3706 add email loader (#3731)
* add images * update component * wip * add loader cntainer * wip * Loader is working * fix color and keyframes * change loading message for threads
This commit is contained in:
@ -3,6 +3,7 @@ import { useQuery } from '@apollo/client';
|
||||
import styled from '@emotion/styled';
|
||||
import { useRecoilState } from 'recoil';
|
||||
|
||||
import { EmailLoader } from '@/activities/emails/components/EmailLoader';
|
||||
import { EmailThreadFetchMoreLoader } from '@/activities/emails/components/EmailThreadFetchMoreLoader';
|
||||
import { EmailThreadPreview } from '@/activities/emails/components/EmailThreadPreview';
|
||||
import { TIMELINE_THREADS_DEFAULT_PAGE_SIZE } from '@/activities/emails/constants/messaging.constants';
|
||||
@ -148,6 +149,10 @@ export const EmailThreads = ({
|
||||
const { totalNumberOfThreads, timelineThreads }: TimelineThreadsWithTotal =
|
||||
data?.[queryName] ?? [];
|
||||
|
||||
if (firstQueryLoading) {
|
||||
return <EmailLoader />;
|
||||
}
|
||||
|
||||
if (!firstQueryLoading && !timelineThreads?.length) {
|
||||
return (
|
||||
<StyledEmptyContainer>
|
||||
|
||||
Reference in New Issue
Block a user