MCPcopy
hub / github.com/anomalyco/opencode / fetchSvgContent

Function fetchSvgContent

packages/console/app/src/component/header.tsx:27–36  ·  view source on GitHub ↗
(svgPath: string)

Source from the content-addressed store, hash-verified

25const isDarkMode = () => window.matchMedia("(prefers-color-scheme: dark)").matches
26
27const fetchSvgContent = async (svgPath: string): Promise<string> => {
28 try {
29 const response = await fetch(svgPath)
30 const svgText = await response.text()
31 return svgText
32 } catch (err) {
33 console.error("Failed to fetch SVG content:", err)
34 throw err
35 }
36}
37
38export function Header(props: { zen?: boolean; go?: boolean; hideGetStarted?: boolean }) {
39 const navigate = useNavigate()

Callers 2

copyWordmarkToClipboardFunction · 0.85
copyLogoToClipboardFunction · 0.85

Calls 2

textMethod · 0.65
fetchFunction · 0.50

Tested by

no test coverage detected