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

Function SelectScope

client/src/components/ui/SearchBox/index.tsx:31–50  ·  view source on GitHub ↗
({ pathname, selectedScope, onChange }: SelectScopeProps)

Source from the content-addressed store, hash-verified

29}
30
31function SelectScope({ pathname, selectedScope, onChange }: SelectScopeProps) {
32 if (atHomepage(pathname)) {
33 return (
34 <button className="btn searchBoxInnerButton" type="button">
35 Everything
36 </button>
37 )
38 }
39
40 return (
41 <select
42 onChange={onChange}
43 value={selectedScope}
44 className="btn searchBoxInnerButton"
45 >
46 <option>Everything</option>
47 <option>This topic</option>
48 </select>
49 )
50}
51
52type Props = {
53 className?: string,

Callers

nothing calls this directly

Calls 1

atHomepageFunction · 0.85

Tested by

no test coverage detected