[WEB-5884] chore: layout loader enhancements #8500
This commit is contained in:
parent
d497304de5
commit
7607cc9b10
6 changed files with 52 additions and 15 deletions
|
|
@ -44,7 +44,9 @@ const KanbanIssueBlockLoader = forwardRef(function KanbanIssueBlockLoader(
|
|||
props: Record<string, unknown>,
|
||||
ref: React.ForwardedRef<HTMLSpanElement>
|
||||
) {
|
||||
return <span ref={ref} className="block h-28 m-1.5 animate-pulse bg-layer-1 rounded-sm" />;
|
||||
return (
|
||||
<span ref={ref} className="block h-28 m-1.5 animate-pulse bg-[var(--illustration-fill-quaternary)] rounded-sm" />
|
||||
);
|
||||
});
|
||||
KanbanIssueBlockLoader.displayName = "KanbanIssueBlockLoader";
|
||||
|
||||
|
|
@ -119,7 +121,17 @@ export const KanbanGroup = observer(function KanbanGroup(props: IKanbanGroup) {
|
|||
scrollableContainerRef={scrollableContainerRef}
|
||||
/>
|
||||
|
||||
{shouldLoadMore && (isSubGroup ? <>{loadMore}</> : <KanbanIssueBlockLoader ref={setIntersectionElement} />)}
|
||||
{shouldLoadMore &&
|
||||
(isSubGroup ? (
|
||||
<>{loadMore}</>
|
||||
) : (
|
||||
<div className="flex flex-col gap-2">
|
||||
{Array.from({ length: 2 }).map((_, index) => (
|
||||
<KanbanIssueBlockLoader key={index} />
|
||||
))}
|
||||
<KanbanIssueBlockLoader ref={setIntersectionElement} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue