Skip to content

Commit

Permalink
fix search results by fixing key
Browse files Browse the repository at this point in the history
  • Loading branch information
virtual committed Jun 27, 2021
1 parent b598a69 commit 6ab07f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/Homepage.js
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react';
import AddRecipe from './AddRecipe';
import DisplayRecipe from './DisplayRecipe';
import Jumbotron from './Jumbotron';
//import Search from './Search';
import Search from './Search';
export default class Homepage extends Component {
constructor() {
super();
Expand All @@ -16,14 +16,16 @@ export default class Homepage extends Component {
return (
<div>
<Jumbotron handleAddClick={this.props.handleAddClick} background={background}/>
<Search
getRecipes={this.props.getRecipes} />
<main>
<div className='container'>
<div className="row">
<div className="card-columns">
{this.props.recipelist.map((item, index) => {
return <DisplayRecipe
getRecipes={this.props.getRecipes}
key={index}
key={item._id}
id={item._id}
elementNo={index}
title={item.title}
Expand Down

0 comments on commit 6ab07f0

Please sign in to comment.