Randomusers component
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import Header from "./components/Header";
|
||||||
|
import RandomUsers from "./components/RandomUsers";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
|
|
||||||
@@ -5,6 +7,8 @@ function App() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
<Header szoveg="Randomuser API" />
|
||||||
|
<RandomUsers />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
11
randomuser_api/src/components/Header.jsx
Normal file
11
randomuser_api/src/components/Header.jsx
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
function Header({szoveg}) {
|
||||||
|
return (
|
||||||
|
<h1 className="text-3xl text-center font-bold text-green-800 bg-green-200 p-2">
|
||||||
|
{szoveg}
|
||||||
|
</h1>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Header
|
||||||
12
randomuser_api/src/components/RandomUsers.jsx
Normal file
12
randomuser_api/src/components/RandomUsers.jsx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { useState,useEffect } from "react";
|
||||||
|
|
||||||
|
function RandomUsers() {
|
||||||
|
const[users,setUsers]=useState([]);
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h2 className="text-2xl text-center font-bold text-green-900 m-5">Felhasználók:</h2>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default RandomUsers
|
||||||
Reference in New Issue
Block a user