import React from 'react';import { IProject } from '../interfaces/IProject';export default function Table(projects : IProject[]) { return (<table className="table-fixed w-full"><thead className="bg-gray-200"><tr><th className="border px-4 py-2 w-12">#</th><th className="border px-4 py-2">Project Name</th><th className="border px-4 py-2">abc</th><th className="border px-4 py-2">xyz</th></tr></thead><tbody> {projects.map((project) => <tr><td key = {project.id} className="border px-4 py-2">{project.name}</td><td key = {project.id} className="border px-4 py-2">{project.totalHours}</td></tr> )} </tbody></table> );}
I'm getting the runtime error : "TypeError: projects.map is not a function" and I can't figure out what I'm doing wrong.