import {GameData} from "../_utils/game.ts" import {ReviewData} from "../_utils/review.ts"; import { ReviewRow, ReviewRowColumnKind, reviewRowColumnKindDefault, ReviewRowColumnPriority } from "./ReviewRow.tsx"; export type ReviewTableProps = { id?: string, reviews: ReviewData[], columns?: ReviewRowColumnKind[] priority?: ReviewRowColumnPriority } export function ReviewTable({id, reviews, columns = reviewRowColumnKindDefault, priority}: ReviewTableProps) { const colElements = columns.map((column, index) => { switch(column) { case "rating": return ( ) case "name": return ( ) case "hascontent": return ( ) case "date": return ( ) } }) const thElements = columns.map((column, index) => { switch(column) { case "rating": return ( ) case "name": return ( Title ) case "namesort": return ( Sort by ) case "hascontent": return ( ) case "date": return ( Date ) } }) const trTdElements = reviews.map((review: ReviewData) => ( )) return ( {colElements} {thElements} {trTdElements}
) }