0

Does someone can say me what caused this error and how to fix it? I already tried to change active keyword but still got same warning. Not sure if it's problem with Styled components or with just attributes. Down is the error and code.

Actual errorActual error

26 row - div under return, 27 - , ...

Codeblock

 return (
    <div>
  <div className="App">
    <div className="portfolio__labels">
      <a
        href="/#"
        active={filter === "all"}
        onClick={() => setFilter("all")}
      >
        All
      </a>
      <a
        href="/#"
        active={filter === "frontend"}
        onClick={() => setFilter("frontend")}
      >
        Frontend
      </a>
      <a
        href="/#"
        active={filter === "mobile"}
        onClick={() => setFilter("mobile")}
      >
        Mobile
      </a>
      <a
        href="/#"
        active={filter === "ux-ui"}
        onClick={() => setFilter("ux-ui")}
      >
        UX/UI
      </a>
      <a
        href="/#"
        active={filter === "others"}
        onClick={() => setFilter("others")}
      >
        Others
      </a>
    </div>
    <div className="portfolio__container">
      {projects.map((item, key) =>
        item.filtered === true ? (
          <ProfileCard
            key={key}
            name={item.name}
            title={item.title}
            image={item.image}
            className="border-box"
            exerpt={item.exerpt}
            git={item.git}
            url={item.url}
            category={item.category}
            click="Push"
            sans-serif
            mb0-l
            mb3
            flex-none
            w5
            mr3
          />
        ) : (
          ""
        )
      )}
    </div>
  </div>
</div>
turok87
  • 81
  • 1
  • 10
  • Why do you tag styled-components even if **theres no styled-components** in your code? What are you trying to achieve? There's no such prop as "active" on "a" tag. Just remove it. – kind user Sep 24 '20 at 21:02
  • @kinduser it was not all code. active choose all active items for the filtering. – turok87 Sep 24 '20 at 21:08
  • I can barely understand what do you want to achieve here. Consider adding more details. – kind user Sep 24 '20 at 21:10
  • @kinduser https://medium.com/@lualmeida_90776/portfolio-filter-with-reactjs-and-react-hooks-b056f136bdba here was some way for portfolio filtering. I did the same just with adding map for project items. – turok87 Sep 24 '20 at 21:12
  • 1
    But this `active` prop **does nothing**. Just remove it. – kind user Sep 24 '20 at 21:15
  • @kinduser right. You're correct. Thank you. – turok87 Sep 24 '20 at 21:17

0 Answers0