-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-ssr.tsx
18 lines (17 loc) · 1.45 KB
/
gatsby-ssr.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import React from 'react';
import { GatsbySSR, withPrefix } from 'gatsby';
export const onRenderBody: GatsbySSR['onRenderBody'] = ({ setHeadComponents }) => {
setHeadComponents([
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/atom.svg`)} as="image" type="image/svg+xml" />,
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/beaker.svg`)} as="image" type="image/svg+xml" />,
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/cable.svg`)} as="image" type="image/svg+xml" />,
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/cd.svg`)} as="image" type="image/svg+xml" />,
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/chip.svg`)} as="image" type="image/svg+xml" />,
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/clock.svg`)} as="image" type="image/svg+xml" />,
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/code.svg`)} as="image" type="image/svg+xml" />,
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/search.svg`)} as="image" type="image/svg+xml" />,
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/tree.svg`)} as="image" type="image/svg+xml" />,
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/wifi.svg`)} as="image" type="image/svg+xml" />,
<link key="icons-preload" rel="preload" href={withPrefix(`/icons/zap.svg`)} as="image" type="image/svg+xml" />,
]);
};