mirror of
https://github.com/fankes/komari-theme-purcarte.git
synced 2025-10-19 20:09:24 +08:00
feat: 添加私有状态处理及私有页面组件
This commit is contained in:
29
src/pages/Private.tsx
Normal file
29
src/pages/Private.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Card,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
export default function Private() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 flex items-center justify-center">
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-2xl font-bold">站点已设为私有</CardTitle>
|
||||
<CardDescription>登录后才能获取数据</CardDescription>
|
||||
</CardHeader>
|
||||
<CardFooter>
|
||||
<Button onClick={() => navigate("/admin")} className="w-full">
|
||||
前往登录
|
||||
</Button>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user