Have you ever used the ternary operator, Conditional (ternary) operator
You can use cell.row.original.status
to access the status
value of each row and display the button based on that value instead of storing it in a status variable.
cell: (cell: any) => ( <div className="inline-flex gap-x-2"> <Link to={`./${cell.row.original.id}/edit`}>Edit</Link> {cell.row.original.status === "Approved" && ( <Link to={`./${cell.row.original.id}/agenda`}>Agenda</Link> )} </div> ),