简体   繁体   中英

React icons display

My imported react icons on my personal website are not displaying at all, i tried reinstalling react-icons with and without --save, i checked node_modules and package.json, everything seems to be in order but it still doesn't work. Here is my code from HeaderSocials.jsx :

import React from 'react'
import { BsLinkedin } from 'react-icons/bs'
import { BsGithub } from 'react-icons/bs'

const HeaderSocials = () => {
  return (
    <div className='header__socials'>
        <a href="https://linkedin.com" target="_blank" rel="noreferrer"> <BsLinkedin/> </a>
        <a href="https://github.com" target="_blank" rel="noreferrer"> <BsGithub/> </a>
        <a href="https://dribbble.com" target="_blank" rel="noreferrer">aa</a>
    </div>
  )
}

export default HeaderSocials

and Header.jsx :

import React from 'react'
import './header.css'
import CTA from './CTA'
import SKANDER from '../../assets/SKANDER.jpg'
import HeaderSocials from './HeaderSocials'

const Header = () => {
  return (
    <div>
      <header>
        <div className="container header__container">
          <h5>Hello I'm</h5>
          <h1>Skander JEDDA</h1>
          <h5 className="text-light">Fullstack JS Developer</h5>
          <CTA />
          <HeaderSocials />

          <div className="me">
            <img src={SKANDER} alt="me" />
          </div>

          <a href="#contact" className='scroll__down'>Scroll Down</a>
        </div>
      </header>
    </div>
  )
}

export default Header

I tried reinstalling the library and checking stackoverflow, i even asked chatGPT but still to no avail

Try removing the className 'header__socials' and then if you want to style your icons here is an example link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM