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

12 lines
330 B
JavaScript

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