Hey I am trying to import my own svg into antd -> Icon component like in the documentation but i got an exception
InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('/static/media/archive-solid.3c305173.svg') is not a valid name.
Im using create react app 2.1.1 and antd version 3.10.3 I would not want to do the create react app eject and i dont access to webpack any ideas. that the code:
import React, { Component } from "react";
import { Layout, Menu, Icon } from "antd";
import ArchiveSVG from "../../../img/icons/archive-solid.svg";
const { Sider } = Layout;
class SideBar extends Component {
state = {
collapsed: false
};
onCollapse = collapsed => {
this.setState({ collapsed });
};
render() {
return (
<Sider
collapsible
collapsed={this.state.collapsed}
onCollapse={this.onCollapse}
>
<div className={styles.logo} />
<Menu theme="dark" defaultSelectedKeys={["1"]} mode="inline">
<Menu.Item key="4">
<Icon component={ArchiveSVG} />
<span>Products</span>
</Menu.Item>
</Menu>
</Sider>
);
}
}