Skip to content

Commit

Permalink
Implement properties card as link
Browse files Browse the repository at this point in the history
  • Loading branch information
mfarisgibran committed Jan 29, 2021
1 parent 8a9de8b commit 9bc6645
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/PropertiesCards.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import { Link } from 'react-router-dom'
import { Box, Heading, Flex, Image, Text } from '@chakra-ui/react'
import { Icon } from '@chakra-ui/react'
import { FaMapMarkerAlt } from 'react-icons/fa'
Expand Down Expand Up @@ -31,6 +32,8 @@ export default function PropertiesCards() {
boxShadow="base"
borderRadius="md"
bg="white"
as={Link}
to={`/properties/${property.id}`}
>
<Image width="320px" src={property.images[0]} alt={property.name} />
<Box pl={4}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PropertiesMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function PropertiesMaps() {
zoom={[10]}
>
{propertiesData.map((property, index) => {
return <MapboxMarker property={property} />
return <MapboxMarker key={index} property={property} />
})}
</Mapbox>
</Box>
Expand Down

0 comments on commit 9bc6645

Please sign in to comment.