Я пытаюсь включить файл SVG в свой проект Gatsby. js.
Компонент LogoIcon выглядит так:
import React from 'react';
import { ReactComponent as LogoInstagram } from '../assets/img/instagram-logo.svg';
const LogoIcon = () => {
return (
<div>
{}
<LogoInstagram />
</div>
);
};
export default LogoIcon;
Я получаю эту ошибку:
Error: Element type is invalid: expected a string (for built-in components) or a
class/function (for composite components) but got: undefined. You likely forgot to export
your component from the file it's defined in, or you might have mixed up default and named
imports.
Check the render method of `LogoIcon`.
▶ 20 stack frames were collapsed.
(anonymous function)
/website/.cache/app.js:67
64 | const preferDefault = m => (m && m.default) || m
65 | let Root = preferDefault(require(`./root`))
66 | domReady(() => {
> 67 | renderer(<Root />, rootElement, () => {
68 | apiRunner(`onInitialClientRender`)
69 | })
70 | })
это связано с файлом SVG или я что-то упустил?