aceinnes
V2EX  ›  问与答

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

  •  
  •   aceinnes · Mar 7, 2023 · 1782 views
    This topic created in 1346 days ago, the information mentioned may be changed or developed.

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

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

    8 replies  •  2023-03-07 22:37:16 +08:00
    wildnode
    wildnode
    Mar 7, 2023
    2
    components/GitHubShareButton.tsx

    这是这个按钮的组件,改其他图标可以在这个组件里改
    不想要的话直接在引用这个组件的页面把它删掉就可以
    aceinnes
    aceinnes
    OP
    Mar 7, 2023
    3
    @wildnode
    @horizon
    修改和删除这个组件会报错,不知道咋回事
    wildnode
    wildnode
    Mar 7, 2023
    4
    @aceinnes #3 好歹贴一下报错信息啊。。
    aceinnes
    aceinnes
    OP
    Mar 7, 2023
    5
    @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
    wildnode
    Mar 7, 2023
    6
    @aceinnes #5 删除提示找不到文件是因为你没有删除在其他文件中的引用
    改动报这个错应该是你的改动造成了一些语法错误
    wildnode
    wildnode
    Mar 7, 2023❤️1
    7
    @aceinnes #5 全局搜一下 `GitHubShareButton` 把所有相关的代码都删掉,应该就可以了的
    aceinnes
    aceinnes
    OP
    Mar 7, 2023
    8
    @wildnode 感谢大佬,全局搜索解决了引用按键的问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2349 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 04:54 · PVG 12:54 · LAX 20:54 · JFK 23:54
    ♥ Do have faith in what you're doing.