feat: 帖子收藏与用户关注
- 新增收藏功能:favorite 服务与 handler、FavoriteButton 组件 - 新增关注功能:follow 服务与 handler、FollowButton 组件 - 用户主页适配关注/粉丝与收藏展示 - flash 消息工具、广告与侧边栏组件微调
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { cache } from "react";
|
||||
import { fetchMe, fetchPublicSettings, fetchSiteState } from "./api";
|
||||
import { fetchBoards, fetchMe, fetchPublicSettings, fetchSiteState } from "./api";
|
||||
|
||||
// 同一 SSR 请求内去重:layout 与页面可能同时需要当前用户,
|
||||
// 相同 Cookie 头参数下只产生一次 /api/me 调用。
|
||||
@@ -10,3 +10,6 @@ export const getPublicSettingsCached = cache(() => fetchPublicSettings());
|
||||
|
||||
// 同请求内去重:注册/找回密码页读取开放状态与提示文案
|
||||
export const getSiteStateCached = cache(() => fetchSiteState());
|
||||
|
||||
// 同请求内去重:帖子详情/用户主页渲染板块管理员徽章需板块名与配色
|
||||
export const getBoardsCached = cache(() => fetchBoards());
|
||||
|
||||
Reference in New Issue
Block a user