diff --git a/src/App.css b/src/App.css index 02993b79..047d72b6 100644 --- a/src/App.css +++ b/src/App.css @@ -1,11 +1,6 @@ .App { padding: 2vh; - text-align: center; background-color: #1f2c38; - min-height: 96vh; - display: flex; - flex-direction: column; - font-size: calc(10px + 2vmin); color: white; } @@ -31,14 +26,14 @@ padding: 5px; border-radius: 10px; color: #1f2c38b6; - margin-left: auto; } .add-btn { padding: 5px; border-radius: 10px; color: #1f2c38b6; - margin-left: 10px; + margin-left: auto; + margin-right: 10px; } textarea:focus, input:focus{ @@ -47,15 +42,17 @@ textarea:focus, input:focus{ .material-icons-outlined.md-36 { font-size: 36px; } -.lables { - display: flex; +.table { + text-align: left; + padding-top: 20px; +} + +.table td { font-size: 1.3rem; + padding: 5px; } -.lable { - padding-right: 15%; +.table th { + font-size: 1.6rem; + padding: 5px; } - -#id { - padding-right: 20px; -} \ No newline at end of file diff --git a/src/App.js b/src/App.js index 2e475c9c..a949cc9e 100644 --- a/src/App.js +++ b/src/App.js @@ -1,22 +1,32 @@ +import { useEffect, useState } from 'react'; import './App.css'; +import List from './componets/List'; function App() { + const [data, setData] = useState([]); + + useEffect(() => { + async function fetchData() { + const res = await fetch('https://api.github.com/users'); + const resJSON = await res.json(); + // data.sort((b, a) => new Date(b.Date) - new Date(a.Date)) // Sort by date + setData(resJSON); + } + + fetchData(); + }, []); + return (
#
-Name
-Title
-Link
+ + +| # | +Name | +Title | +Link | +
|---|---|---|---|
| {i + 1} | +{e.login} | +{e.node_id} | +{e.html_url} | +