How to use Material Icons with next.js?

Asked

Viewed 405 times

0

import Link from 'next/link';
import MaterialIcon from 'material-icons-react';

const Header = (props) => {
  return (
    <nav>
      <ul>
        {navOptions.map(nav => (
          <li>
            <Link href={nav.url}>
              <a>
                <MaterialIcon icon={nav.icon} />
                <span key={nav.icon}>{nav.name}</span>
              </a>
            </Link>
          </li>
        ))}
      </ul>
    </nav>
  )
}

export default Header;

The above code generates the following error:

Erro

It seems to me I need a tracker, but I can’t quite figure out which one.

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.