refactor: 移除 Dashboard 页面及相关功能,更新路由和组件逻辑

- 移除 Dashboard 相关的组件、特性和测试代码,简化项目结构。
- 更新 PageSkeleton 组件,默认渲染工具页面骨架。
- 修改 RouterContainer 和 RouterProvider 以适应新的默认路由策略,确保用户直接访问 timestamp 页面。
- 更新测试用例,确保在新结构下的功能正常。
This commit is contained in:
2026-07-05 22:02:25 +08:00
parent d21e970f56
commit 9aa7a51f0b
29 changed files with 233 additions and 535 deletions
+2 -6
View File
@@ -30,7 +30,7 @@ function LoadedPage({ pageKey }: { pageKey: PageType }) {
}, [pageKey]);
if (!Page) {
return <PageSkeleton variant={pageKey === 'dashboard' ? 'dashboard' : 'tool'} />;
return <PageSkeleton />;
}
return <Page />;
@@ -39,9 +39,6 @@ function LoadedPage({ pageKey }: { pageKey: PageType }) {
export default function RouterContainer() {
const { currentPage } = useRouter();
const animationClass =
currentPage === 'dashboard' ? 'page-transition-dashboard' : 'page-transition-enter';
const currentFeature = getFeatureByKey(currentPage);
return (
@@ -49,8 +46,7 @@ export default function RouterContainer() {
key={currentPage}
className={cn(
'flex-1 flex flex-col overflow-x-hidden overflow-y-auto',
'motion-reduce:transition-none',
animationClass,
'motion-reduce:transition-none page-transition-enter',
)}
>
<PageErrorBoundary resetKey={currentPage}>