MCPcopy
hub / github.com/swagger-api/swagger-ui / render

Method render

src/core/components/contact.jsx:17–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 }
16
17 render() {
18 const { data, getComponent, selectedServer, url: specUrl } = this.props
19 const name = data.get("name", "the developer")
20 const url = safeBuildUrl(data.get("url"), specUrl, { selectedServer })
21 const email = data.get("email")
22
23 const Link = getComponent("Link")
24
25 return (
26 <div className="info__contact">
27 {url && (
28 <div>
29 <Link href={sanitizeUrl(url)} target="_blank">
30 {name} - Website
31 </Link>
32 </div>
33 )}
34 {email && (
35 <Link href={sanitizeUrl(`mailto:${email}`)}>
36 {url ? `Send email to ${name}` : `Contact ${name}`}
37 </Link>
38 )}
39 </div>
40 )
41 }
42}
43
44export default Contact

Callers

nothing calls this directly

Calls 4

safeBuildUrlFunction · 0.90
sanitizeUrlFunction · 0.90
getComponentFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected