diff --git a/src/components/TaskDetail.tsx b/src/components/TaskDetail.tsx
index 1323b75..c19bba5 100644
--- a/src/components/TaskDetail.tsx
+++ b/src/components/TaskDetail.tsx
@@ -13,6 +13,7 @@ import {
} from "@mui/material";
import { UserContext } from "../contexts/userContext";
import type { User } from "../utils/types";
+import TaskNotFound from "./TaskNotFound";
const TaskDetail: React.FC = () => {
const navigate = useNavigate();
@@ -26,7 +27,7 @@ const TaskDetail: React.FC = () => {
const taskInQuestion = tasks.find((task) => task.id === numerizedTaskId);
- if (!taskInQuestion) return
Task not found
;
+ if (!taskInQuestion) return ;
let userInQuestion: User | undefined;
if (users && !loading) {
diff --git a/src/components/TaskNotFound.tsx b/src/components/TaskNotFound.tsx
new file mode 100644
index 0000000..00a24b8
--- /dev/null
+++ b/src/components/TaskNotFound.tsx
@@ -0,0 +1,31 @@
+import {
+ Button,
+ Card,
+ CardContent,
+ CardHeader,
+ Stack,
+ Typography,
+} from "@mui/material";
+import { useNavigate, useParams } from "react-router-dom";
+
+const TaskNotFound: React.FC = () => {
+ const { taskId } = useParams();
+
+ const navigate = useNavigate();
+
+ return (
+
+
+
+
+ Task #{taskId} not found
+
+
+
+
+ );
+};
+
+export default TaskNotFound;