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

Function AddForm

client/src/components/TopicPage/ViewTopicPage/AddForm/index.tsx:85–102  ·  view source on GitHub ↗
(props: Props)

Source from the content-addressed store, hash-verified

83}
84
85export default function AddForm(props: Props) {
86 const viewer = useFragment(viewerFragment, props.viewer)
87 const parentTopic = useFragment(parentTopicFragment, props.parentTopic)
88 const isPrivateRepo = !!viewer.selectedRepo?.isPrivate
89
90 const selectRepositoryStyle = {
91 backgroundColor: isPrivateRepo ?
92 viewer.selectedRepo?.displayColor :
93 'transparent',
94 }
95
96 return (
97 <form className="border rounded-1 px-md-2 px-3 mt-3" style={selectRepositoryStyle}>
98 <SelectRepository currentTopicId={parentTopic.id} viewer={viewer} />
99 <InnerAddForm isPrivateRepo={isPrivateRepo} topic={parentTopic} viewer={viewer} />
100 </form>
101 )
102}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected