import { React } from '../common';
const LOAD_TYPE_KIT = `try{Typekit.load({ async: true });}catch(e){}`;

/**
 * Inserts the Typekit script.
 */
export function typekit(id: string) {
  return [
    <script key={'typekit-script'} src={`https://use.typekit.net/${id}.js`} />,
    <script
      key={'typekit-js'}
      dangerouslySetInnerHTML={{ __html: LOAD_TYPE_KIT }}
    />,
  ];
}
