فهرست منبع

:art: use antd result

visuddhinanda 3 سال پیش
والد
کامیت
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;