feat(auth): 实现登录注册功能并重构 App 组件
- 新增登录和注册页面组件
- 实现用户认证和权限管理逻辑
- 重构 App 组件,使用 Router 和 AuthProvider
- 添加管理员面板和论坛页面组件
Change-Id: Iaa4502616970e75e3268537f73c75dac8f60e24d
diff --git a/src/pages/UnauthorizedPage.jsx b/src/pages/UnauthorizedPage.jsx
new file mode 100644
index 0000000..30efee6
--- /dev/null
+++ b/src/pages/UnauthorizedPage.jsx
@@ -0,0 +1,20 @@
+import React from 'react';
+import { Result, Button } from 'antd';
+import { Link } from 'react-router-dom';
+
+const UnauthorizedPage = () => {
+ return (
+ <Result
+ status="403"
+ title="无权限访问"
+ subTitle="抱歉,您没有权限访问此页面。"
+ extra={
+ <Button type="primary">
+ <Link to="/">返回首页</Link>
+ </Button>
+ }
+ />
+ );
+};
+
+export default UnauthorizedPage;
\ No newline at end of file