Yohann76/BileMo_B2B_API

View on GitHub
assets/js/phone/SinglePhone.js

Summary

Maintainability
A
0 mins
Test Coverage
import React from "react";
import Phone from "./Phone";

export default function SinglePhone(props) {

    const { Result, isLoaded } = props;

    if (!isLoaded) {
        return (
            <td className="text-center"> Loading...</td>
        );
    }

    return (
        <table className="table">
            <thead className="table table-dark">
            <tr>
                <th scope="col-xs-3">ID</th>
                <th scope="col-xs-3">Name</th>
                <th scope="col-xs-3">Price</th>
                <th scope="col-xs-3">color</th>
                <th scope="col-xs-3">description</th>
            </tr>
            </thead>
            <tbody>
            {Result.map((Result) => {
                return (
                    <tr key={Result.id}>
                        <td>{Result.id}</td>
                        <td>{Result.name}</td>
                        <td>{Result.price}</td>
                        <td>{Result.color}</td>
                        <td>{Result.description}</td>

                    </tr>
                );
            })}
            </tbody>
        </table>
    );
}