subgraph-sync
Version:
React hooks and components for tracking subgraph synchronization states with Apollo Client
32 lines (31 loc) • 878 B
TypeScript
import React from "react";
import { UseSubgraphSyncResult } from "../types";
interface SyncIndicatorProps {
/** Sync state from useSubgraphSync hook */
syncState: UseSubgraphSyncResult;
/** Whether to show progress bar (default: true) */
showProgress?: boolean;
/** Whether to show block information (default: true) */
showBlockInfo?: boolean;
/** Additional CSS class names */
className?: string;
}
/**
* Pre-built UI component for displaying subgraph synchronization state.
* Shows sync status, progress bar, and block information.
*
* @example
* ```tsx
* const syncState = useSubgraphSync({ blockNumber: 1000000 });
*
* return (
* <SyncIndicator
* syncState={syncState}
* showProgress={true}
* showBlockInfo={true}
* />
* );
* ```
*/
export declare const SyncIndicator: React.FC<SyncIndicatorProps>;
export {};