depot/web/lukegbcom/lib/NetworkingTools/RFCLink.js

13 lines
330 B
JavaScript
Raw Normal View History

2022-04-03 23:32:57 +00:00
import React from "react"
const RFCLink = ({ rfc, draft, children }) => {
const destination = draft ? `https://www.iana.org/go/draft-${rfc}` : `https://tools.ietf.org/html/rfc${rfc}`;
const text = draft ? `RFC-${rfc}` : `RFC${rfc}`;
return (
<a href={destination}>{children} ({text})</a>
)
}
export default RFCLink