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

2023-03-07 19:57:40 +08:00
 aceinnes

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

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

939 次点击
所在节点    问与答
8 条回复
horizon
2023-03-07 20:02:30 +08:00
wildnode
2023-03-07 20:04:31 +08:00
components/GitHubShareButton.tsx

这是这个按钮的组件,改其他图标可以在这个组件里改
不想要的话直接在引用这个组件的页面把它删掉就可以
aceinnes
2023-03-07 20:13:23 +08:00
@wildnode
@horizon
修改和删除这个组件会报错,不知道咋回事
wildnode
2023-03-07 20:20:06 +08:00
@aceinnes #3 好歹贴一下报错信息啊。。
aceinnes
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
2023-03-07 21:31:07 +08:00
@aceinnes #5 删除提示找不到文件是因为你没有删除在其他文件中的引用
改动报这个错应该是你的改动造成了一些语法错误
wildnode
2023-03-07 21:32:04 +08:00
@aceinnes #5 全局搜一下 `GitHubShareButton` 把所有相关的代码都删掉,应该就可以了的
aceinnes
2023-03-07 22:37:16 +08:00
@wildnode 感谢大佬,全局搜索解决了引用按键的问题

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/922011

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX