Skip to content

Commit

Permalink
Modify Link for List Items
Browse files Browse the repository at this point in the history
  • Loading branch information
pmallol committed May 12, 2020
1 parent 93a9501 commit 5d1db59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styles from './item.module.scss'
const Item = (props) => {
return (
<div className={styles.item}>
<Link href="/[id]" as={`/${props.name}`}>
<Link href="/[id]" as={`/${props.id}`}>
<a>
<div style={{backgroundImage: `url(${props.image})`}} ></div>
<p>{props.name}</p>
Expand Down
2 changes: 1 addition & 1 deletion components/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const List = () => {
return (
<div className={styles.list}>
{gardens.map(garden => {
return <Item name={garden.name} image={garden.image} key={garden.id} />
return <Item key={garden.id} name={garden.name} image={garden.image} id={garden.id} />
})}
</div>
)
Expand Down

0 comments on commit 5d1db59

Please sign in to comment.