fix: add pharmacy map to ProductView and fix pharmacies endpoint
- Added PharmacyMap component to ProductView - Updated backend to accept all valid sources for pharmacies endpoint - Shows map with pharmacy locations and list of pharmacies with prices
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import PharmacyMap from '../components/PharmacyMap';
|
||||
import './ProductView.css';
|
||||
|
||||
export default function ProductView({ source, id, onBack }) {
|
||||
@@ -150,6 +151,9 @@ export default function ProductView({ source, id, onBack }) {
|
||||
<h3 className="pharmacies-title">
|
||||
Disponible en {pharmacies.length} {pharmacies.length === 1 ? 'farmacia' : 'farmacias'}
|
||||
</h3>
|
||||
|
||||
<PharmacyMap pharmacies={pharmacies} />
|
||||
|
||||
<div className="pharmacies-grid">
|
||||
{pharmacies.map((pharmacy) => (
|
||||
<div key={pharmacy.id} className="product-pharmacy-card">
|
||||
|
||||
Reference in New Issue
Block a user