[优化]首页改版
521xueweihan opened this issue · comments
削微寒 commented
HelloGitHub 社区首页正在动工改版!将围绕 更方便、增强互动、独特性 的方向进行优化,诚邀您体验后进行反馈。地址:https://hellogithub.com/
目前的改动计划:
- 更便捷地找到项目:增加标签侧边栏
- item 样式优化:评论数为零不显示、参与评论的用户头像、月刊标识符、互动数据
如果您有什么建议,欢迎留言讨论。
github-actions commented
Branch i94-_优化_首页改版 created!
wsh commented
点击进入项目介绍页面后返回,首页自动刷新到头部,能否考虑进入介绍页面时缓存首页内容。
Owen Kriz commented
猜测是不是需要一个缓存location的内容?
const location = useLocation()
const state = location.state as { backgroundLocation?: Location }
<Routes location={state?.backgroundLocation || location}>
...
<Route path={"/repo-details"} element={<RepoDetails />} />
</Routes>
// 返回列表,其实任何页面进入了详情,都是缓存的
navigate(-1)
// 导航去别的页面
navigate("others")
https://dev.to/devmdmamun/create-contextual-modal-navigation-with-react-router-v6-28k2
Zeke Zhang commented
点击进入项目介绍页面后返回,首页自动刷新到头部,能否考虑进入介绍页面时缓存首页内容。
@WShihan 现在的项目介绍页是在新的页面中打开的,如果要返回上一个页面建议直接把当前页面关闭就可以了。