- 新增击杀信息生成器页面,支持CS2和CStrike两种游戏样式 - 引入字体文件用于击杀信息渲染 - 添加多种骨架屏组件(AuthSkeleton、PageSkeleton等)改善加载体验 - 更新依赖包,新增html-to-image、react-icons等库 - 优化现有组件的样式和导入路径 - 统一使用@别名导入模块
21 lines
556 B
TypeScript
21 lines
556 B
TypeScript
import { useLocation } from "react-router-dom";
|
|
import { AuthSkeleton } from "./AuthSkeleton";
|
|
import { PageSkeleton } from "./PageSkeleton";
|
|
|
|
export function LoadingFallback() {
|
|
const location = useLocation();
|
|
const path = location.pathname;
|
|
|
|
if (path === "/login" || path === "/register") {
|
|
return <AuthSkeleton />;
|
|
}
|
|
|
|
// For Kill Generation (DeathMsg) or other HUD tools
|
|
if (path.startsWith("/hud") || path.startsWith("/demo")) {
|
|
return <PageSkeleton />;
|
|
}
|
|
|
|
// Default fallback (Home, About, etc.)
|
|
return <PageSkeleton />;
|
|
}
|