2973-feat: Skeleton Loading Added (#2988)
* 2973-feat: Skeleton Loading Added * loading from useQuery * PR suggestions fixed * Fix accoding to review --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -25,7 +25,7 @@ const StyledScrollWrapper = styled(ScrollWrapper)`
|
||||
`;
|
||||
|
||||
export type ShowPageContainerProps = {
|
||||
children: ReactElement[];
|
||||
children: ReactElement[] | ReactElement;
|
||||
};
|
||||
|
||||
export const ShowPageContainer = ({ children }: ShowPageContainerProps) => {
|
||||
|
||||
@ -38,7 +38,7 @@ const StyledIntermediateContainer = styled.div`
|
||||
`;
|
||||
|
||||
export type ShowPageLeftContainerProps = {
|
||||
children: ReactElement[];
|
||||
children: ReactElement;
|
||||
};
|
||||
|
||||
export const ShowPageLeftContainer = ({
|
||||
|
||||
@ -40,7 +40,7 @@ const StyledTabListContainer = styled.div`
|
||||
`;
|
||||
|
||||
type ShowPageRightContainerProps = {
|
||||
entity: ActivityTargetableEntity;
|
||||
entity?: ActivityTargetableEntity;
|
||||
timeline?: boolean;
|
||||
tasks?: boolean;
|
||||
notes?: boolean;
|
||||
@ -55,7 +55,12 @@ export const ShowPageRightContainer = ({
|
||||
emails,
|
||||
}: ShowPageRightContainerProps) => {
|
||||
const isMessagingEnabled = useIsFeatureEnabled('IS_MESSAGING_ENABLED');
|
||||
const [activeTabId] = useRecoilScopedState(
|
||||
activeTabIdScopedState,
|
||||
ShowPageRecoilScopeContext,
|
||||
);
|
||||
|
||||
if (!entity) return <></>;
|
||||
const TASK_TABS = [
|
||||
{
|
||||
id: 'timeline',
|
||||
@ -94,11 +99,6 @@ export const ShowPageRightContainer = ({
|
||||
},
|
||||
];
|
||||
|
||||
const [activeTabId] = useRecoilScopedState(
|
||||
activeTabIdScopedState,
|
||||
ShowPageRecoilScopeContext,
|
||||
);
|
||||
|
||||
return (
|
||||
<StyledShowPageRightContainer>
|
||||
<StyledTabListContainer>
|
||||
|
||||
Reference in New Issue
Block a user