visuddhinanda 3 лет назад
Родитель
Сommit
18d65901d6
2 измененных файлов с 24 добавлено и 6 удалено
  1. 10 1
      dashboard/src/pages/nut/forbidden.tsx
  2. 14 5
      dashboard/src/pages/nut/not-found.tsx

+ 10 - 1
dashboard/src/pages/nut/forbidden.tsx

@@ -1,5 +1,14 @@
+import { Button, Result } from "antd";
+
 const Widget = () => {
-  return <div>forbidden</div>;
+	return (
+		<Result
+			status="404"
+			title="404"
+			subTitle="Sorry, the page you visited does not exist."
+			extra={<Button type="primary">Back Home</Button>}
+		/>
+	);
 };
 
 export default Widget;

+ 14 - 5
dashboard/src/pages/nut/not-found.tsx

@@ -1,10 +1,19 @@
-const titleStyle = {
-  fontSize: "48px",
-  color: "red",
-};
+import { Button, Result } from "antd";
+import { Link } from "react-router-dom";
 
 const Widget = () => {
-  return <div style={titleStyle}>forbidden</div>;
+	return (
+		<Result
+			status="404"
+			title="404"
+			subTitle="Sorry, the page you visited does not exist."
+			extra={
+				<Link to="/">
+					<Button type="primary">Back Home</Button>
+				</Link>
+			}
+		/>
+	);
 };
 
 export default Widget;