diff --git a/src/app/components/SearchResult/index.tsx b/src/app/components/SearchResult/index.tsx new file mode 100644 index 0000000..bb0f991 --- /dev/null +++ b/src/app/components/SearchResult/index.tsx @@ -0,0 +1,44 @@ +import React from "react"; + +type SearchResultProps = { + headers: string[]; + data: Array>; +}; + +export const sampleHeader = [ + "titleJp", + "period", + "category", + "credit", + "classroom", + "lecturer", +]; + +const SearchResult: React.FC = ({ headers, data }) => { + return ( +
+ + + {data.map((row, rowIndex) => ( + + + + ))} + +
+
+ {headers.map((header, colIndex) => ( + + {`${header}: ${row[header]}` || ""} + + ))} +
+
+
+ ); +}; + +export default SearchResult;