MCPcopy Create free account
hub / github.com/emwalker/digraph / SelectedRepo

Function SelectedRepo

client/src/components/Layout/SelectedRepo/index.tsx:10–33  ·  view source on GitHub ↗
(props: Props)

Source from the content-addressed store, hash-verified

8}
9
10export default function SelectedRepo(props: Props) {
11 const viewer = useFragment(
12 graphql`
13 fragment SelectedRepo_viewer on User {
14 selectedRepo {
15 displayColor
16 fullName
17 isPrivate
18 }
19 }
20 `,
21 props.viewer,
22 )
23
24 const repo = viewer.selectedRepo
25 if (!repo || !repo.isPrivate) return null
26 const backgroundColor = repo.displayColor as string
27
28 return (
29 <div className="SelectedRepo-banner" style={{ backgroundColor }}>
30 <h2>{repo.fullName || 'Personal repo'}</h2>
31 </div>
32 )
33}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected