MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / StarCountProvider

Function StarCountProvider

app/components/StarCountProvider.tsx:8–20  ·  view source on GitHub ↗
({
  children,
  starCount,
}: {
  children: ReactNode;
  starCount: StarCountType;
})

Source from the content-addressed store, hash-verified

6const StarCountContext = createContext<StarCountType>(undefined);
7
8export function StarCountProvider({
9 children,
10 starCount,
11}: {
12 children: ReactNode;
13 starCount: StarCountType;
14}) {
15 return (
16 <StarCountContext.Provider value={starCount}>
17 {children}
18 </StarCountContext.Provider>
19 );
20}
21
22export function useStarCount(): StarCountType {
23 return useContext(StarCountContext);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected