添加新的骨架屏,将评查点列表和评查文件列表,文档列表进行数据分类

This commit is contained in:
2025-06-04 17:31:10 +08:00
parent bbc074eeec
commit 8fbf915656
17 changed files with 537 additions and 275 deletions
+3 -2
View File
@@ -6,7 +6,7 @@ import { useMatches, useLocation } from '@remix-run/react';
import type { UserRole } from '~/root';
// 定义应用模块类型
type AppModule = 'contract' | 'record' | 'model';
type AppModule = 'contract' | 'record' | 'model' | '';
// 应用模块与reviewType的映射
const REVIEW_TYPE_TO_APP: Record<string, AppModule> = {
@@ -34,7 +34,7 @@ interface Match {
export function Layout({ children, userRole = 'developer' }: LayoutProps) {
const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
const [selectedApp, setSelectedApp] = useState<AppModule>('contract');
const [selectedApp, setSelectedApp] = useState<AppModule>('');
const matches = useMatches() as Match[];
const location = useLocation();
@@ -102,6 +102,7 @@ export function Layout({ children, userRole = 'developer' }: LayoutProps) {
return (
<div className="layout-container">
{/* 侧边栏始终保留,不再使用条件渲染 */}
<Sidebar
collapsed={sidebarCollapsed}
onToggle={toggleSidebar}