Created
June 19, 2022 07:44
-
-
Save Manntrix/73082571b34e9391a4af930084670c71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "./styles.css"; | |
import Table from "./components/Table"; | |
import { useMemo } from "react"; | |
import data from "./users.json"; | |
export default function App() { | |
const columns = useMemo( | |
() => [ | |
{ | |
Header: "ID", | |
accessor: "id", | |
}, | |
{ | |
Header: "Name", | |
accessor: "name", | |
}, | |
{ | |
Header: "Username", | |
accessor: "username", | |
}, | |
{ | |
Header: "Email", | |
accessor: "email", | |
}, | |
{ | |
Header: "Phone", | |
accessor: "phone", | |
}, | |
], | |
[] | |
); | |
return ( | |
<div className="App"> | |
<Table columns={columns} data={data} /> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment