V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
aceinnes
V2EX  ›  问与答

有前端大佬吗,问个前端问题

  •  
  •   aceinnes · 2023-03-07 19:57:40 +08:00 · 918 次点击
    这是一个创建于 388 天前的主题,其中的信息可能已经有所发展或是发生改变。

    这个项目: https://github.com/transitive-bullshit/nextjs-notion-starter-kit 项目预览: https://nextjs-notion-starter-kit.transitivebullsh.it/

    网页右上角的 github 图标怎么删除,或者改成其他图标。 52r1A.png

    8 条回复    2023-03-07 22:37:16 +08:00
    wildnode
        2
    wildnode  
       2023-03-07 20:04:31 +08:00
    components/GitHubShareButton.tsx

    这是这个按钮的组件,改其他图标可以在这个组件里改
    不想要的话直接在引用这个组件的页面把它删掉就可以
    aceinnes
        3
    aceinnes  
    OP
       2023-03-07 20:13:23 +08:00
    @wildnode
    @horizon
    修改和删除这个组件会报错,不知道咋回事
    wildnode
        4
    wildnode  
       2023-03-07 20:20:06 +08:00
    @aceinnes #3 好歹贴一下报错信息啊。。
    aceinnes
        5
    aceinnes  
    OP
       2023-03-07 20:56:57 +08:00
    @wildnode

    前端大佬帮忙看看,删除会显示找不到文件,改动会显示:
    Failed to compile.
    ./components/GitHubShareButton.tsx
    8:2 Error: Parsing error: Expression expected.
    info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    Error: Command "yarn run build" exited with 1
    wildnode
        6
    wildnode  
       2023-03-07 21:31:07 +08:00
    @aceinnes #5 删除提示找不到文件是因为你没有删除在其他文件中的引用
    改动报这个错应该是你的改动造成了一些语法错误
    wildnode
        7
    wildnode  
       2023-03-07 21:32:04 +08:00   ❤️ 1
    @aceinnes #5 全局搜一下 `GitHubShareButton` 把所有相关的代码都删掉,应该就可以了的
    aceinnes
        8
    aceinnes  
    OP
       2023-03-07 22:37:16 +08:00
    @wildnode 感谢大佬,全局搜索解决了引用按键的问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2844 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 13:45 · PVG 21:45 · LAX 06:45 · JFK 09:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.