+
handleChange(event.target.value)}
+ aria-label="Search tasks"
+ />
+
+ {open && results.length > 0 && (
+
+ {results.map((hit: any) => (
+ - onSelect(hit.task.id)}>
+ {hit.task.title}
+
+
+ ))}
+
+ )}
+
+ {open && results.length === 0 && (
+
+ )}
+
+ );
+}
diff --git a/frontend/src/pages/BoardPage.tsx b/frontend/src/pages/BoardPage.tsx
index 38219e7..8fcc0f2 100644
--- a/frontend/src/pages/BoardPage.tsx
+++ b/frontend/src/pages/BoardPage.tsx
@@ -5,6 +5,7 @@
import { useEffect, useState, type JSX } from "react";
import Header from "../components/Header";
+import SearchBar from "../components/SearchBar";
import TaskBoard from "../components/TaskBoard";
import TaskForm from "../components/TaskForm";
import { useAuth } from "../hooks/authContext";
@@ -50,6 +51,13 @@ export default function BoardPage(): JSX.Element {
});
};
+ const handleSearchSelect = (taskId: number): void => {
+ const card = document.querySelector(`[data-testid="task-${taskId}"]`);
+ if (card) {
+ card.scrollIntoView({ behavior: "smooth", block: "center" });
+ }
+ };
+
if (!user) {
return