🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
import { useMemo } from 'react';
import type { ViewMode } from '@/features/ResourceManager/store/initialState';
interface UseMasonryViewStateOptions {
dataLength: number;
isLoading: boolean;
isNavigating: boolean;
isValidating: boolean;
viewMode: ViewMode;
}
export const useMasonryViewState = ({
dataLength,
isLoading,
isNavigating,
isValidating: _isValidating,
viewMode: _viewMode,
}: UseMasonryViewStateOptions) => {
const showSkeleton = useMemo(
() => (isLoading && dataLength === 0) || isNavigating,
[dataLength, isLoading, isNavigating],
);
const isMasonryReady = !showSkeleton;
return {
isMasonryReady,
showSkeleton,
};
};