diff --git a/frontend/src/components/Place/PlaceItem.tsx b/frontend/src/components/Place/PlaceItem.tsx new file mode 100644 index 00000000..7bf2f0ec --- /dev/null +++ b/frontend/src/components/Place/PlaceItem.tsx @@ -0,0 +1,31 @@ +import { useGoogleMapStore } from '@/store/googleMapState'; +import { Place } from '@/types'; + +const PlaceItem = ({ place }: { place: Place }) => { + const moveToLocation = useGoogleMapStore((state) => state.moveTo); + const location = place.location; + + const onPlaceClick = () => { + moveToLocation(location.lat, location.lng); + }; + + return ( +
+ {place.name} +
+

{place.name}

+

{place.formed_address}

+
{place.rating} ⭐️
+
+
+ ); +}; + +export default PlaceItem;