为什么在我的React网络上,社交媒体的锚无法质量起作用,而在用户重新加载页面时,它起作用的细节?

发布于 2025-01-29 10:17:17 字数 1235 浏览 2 评论 0原文

    When user click, it does not open nothing and once reload the browser the 
    anchor open the url social media and all is fine until user navigate to other 
    page and come back again to Contact page the problem is repeated 

导出const contact =()=> {

    return (
            <div className="socialMedia">
                <p className="mb-3">Visítenos en nuestras Redes Sociales</p>
                <ul >
                 <li> 
                    <a  href="https://www.instagram.com/fridartestudio"
                        target="_blank"
                        rel="noreferrer"
                    ><i className="bi bi-instagram" id="inst" ></i></a>
                  </li>

                  <li>
                      <a href="https://www.facebook.com/fridarteestudio"
                      target="_blank"
                      rel="noreferrer"
                    
                    ><i className="bi bi-facebook" id="faceb" ></i></a>
                  </li >
                </ul>
             </div>
    )

}

我想知道如何通过锚点链接社交媒体解决这个简单的问题。谢谢

    When user click, it does not open nothing and once reload the browser the 
    anchor open the url social media and all is fine until user navigate to other 
    page and come back again to Contact page the problem is repeated 

export const Contact = () => {

    return (
            <div className="socialMedia">
                <p className="mb-3">Visítenos en nuestras Redes Sociales</p>
                <ul >
                 <li> 
                    <a  href="https://www.instagram.com/fridartestudio"
                        target="_blank"
                        rel="noreferrer"
                    ><i className="bi bi-instagram" id="inst" ></i></a>
                  </li>

                  <li>
                      <a href="https://www.facebook.com/fridarteestudio"
                      target="_blank"
                      rel="noreferrer"
                    
                    ><i className="bi bi-facebook" id="faceb" ></i></a>
                  </li >
                </ul>
             </div>
    )

}

I would like to know how to solve this simple problem with my anchors links social media. thanks by the way

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

铁轨上的流浪者 2025-02-05 10:17:17

我尝试了您的代码,实际上对我来说很好。它正在打开社交链接,即使在我导航到另一页并回到联系人之后,它仍然有效。如何使用npm start重新打开项目,

也可以阅读此信息-g

https://www.digitalocean.com/community/community/tutorials/creating-a-social-social-follow-component-in-reakct-in>

I tried out your code it's actually working fine for me. It's opening the social links and even after I navigate to other page and come back to Contact it still worked fine. How about you re-open your project with npm start

You can also read this out -

https://www.digitalocean.com/community/tutorials/creating-a-social-follow-component-in-react

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文