I have 2 API addresses below, and I need to create a react card that brings the photo of the first API, and the second post.
componentDidMount() {
fetch('https://jsonplaceholder.typicode.com/users')
.then(response=> response.json())
.then(users => {this.setState({ post: users})});
}
render() {
const { post, searchfield } = this.state;
const filteredPost = post.filter(post =>{
return post.name.toLowerCase().includes(searchfield.toLowerCase());
})
return (
<div className="App">
<h1 style={{ textAlign: 'center'}}>
Busca de Posts
</h1>
<Buscador searchChange={this.onSearchChange} />
<div className='wrapper'>
<UserList post={filteredPost} />
</div>
</div>
);
}