fix remaining eslint error

This commit is contained in:
DaneEveritt 2022-06-26 15:30:05 -04:00
parent dc84af9937
commit 922d75f471
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
15 changed files with 30 additions and 28 deletions

View file

@ -9,9 +9,7 @@ interface Props {
}
const Icon = ({ icon, className, style }: Props) => {
let [width, height, , , paths] = icon.icon;
paths = Array.isArray(paths) ? paths : [paths];
const [width, height, , , paths] = icon.icon;
return (
<svg
@ -21,7 +19,7 @@ const Icon = ({ icon, className, style }: Props) => {
className={className}
style={style}
>
{paths.map((path, index) => (
{(Array.isArray(paths) ? paths : [paths]).map((path, index) => (
<path key={`svg_path_${index}`} d={path} />
))}
</svg>