refactor: 前端登录/权限/界面状态迁移至 zustand
This commit is contained in:
@@ -181,7 +181,7 @@ const RoomsPage: React.FC = () => {
|
||||
|
||||
// 获取楼栋列表用于筛选
|
||||
const buildings = useMemo(() => {
|
||||
const set = new Set(data.map((r: any) => r.building).filter(Boolean));
|
||||
const set = new Set(data.flatMap((r: any) => (r.building ? [r.building] : [])));
|
||||
return [...set].sort();
|
||||
}, [data]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user