import { Modal, Button } from 'react-bootstrap' import { MapContainer, Marker, Popup, TileLayer } from 'react-leaflet' import { CSSProperties, useState } from 'react' import { LatLng } from 'leaflet' import LineDot from './LineDot' import { categoryNames } from '../assets/category' import { useBook, useRemoveAnnouncement } from '../hooks/api' import { Announcement } from '../api/announcement/types' import { iconItem } from '../utils/markerIcons' import { useId } from '../hooks' import SelectDisposalTrashbox from './SelectDisposalTrashbox' import StarRating from './StarRating' const styles = { container: { display: 'flex', alignItems: 'center', justifyContent: 'center', } as CSSProperties, map: { width: '100%', minHeight: 300, } as CSSProperties, } type ViewProps = { myId: number, announcement: Announcement, } const View = ({ myId, announcement: { name, category, bestBy, description, lat, lng, address, metro, userId }, }: ViewProps) => ( <>
{description}
Рейтинг пользователя:
Забронировали {bookedBy + (bookButton.disabled ? 1 : 0)} чел.
{(myId === userId) ? ( <>