|
@@ -14,13 +14,15 @@ const MarkerItem = ({
|
|
|
iconUrl,
|
|
|
coordinate,
|
|
|
seriesName,
|
|
|
- toggleSeries
|
|
|
+ toggleSeries,
|
|
|
+ token
|
|
|
}: {
|
|
|
marker: ItemSeries;
|
|
|
iconUrl: string;
|
|
|
coordinate?: any;
|
|
|
seriesName: string;
|
|
|
toggleSeries: (item: any) => void;
|
|
|
+ token: string;
|
|
|
}) => {
|
|
|
let markerRef = useRef<MapMarker>(null);
|
|
|
useEffect(() => {
|
|
@@ -35,7 +37,7 @@ const MarkerItem = ({
|
|
|
<View
|
|
|
style={[
|
|
|
styles.markerContainer,
|
|
|
- marker.visited === 1 && { backgroundColor: Colors.ORANGE }
|
|
|
+ (marker.visited === 1 && token && { backgroundColor: Colors.ORANGE }) || {}
|
|
|
]}
|
|
|
>
|
|
|
<Image source={{ uri: iconUrl }} style={styles.icon} resizeMode="contain" />
|
|
@@ -53,15 +55,17 @@ const MarkerItem = ({
|
|
|
<CalloutSubview
|
|
|
style={[
|
|
|
styles.calloutButton,
|
|
|
- marker.visited === 1 && {
|
|
|
- backgroundColor: Colors.WHITE,
|
|
|
- borderWidth: 1,
|
|
|
- borderColor: Colors.BORDER_LIGHT
|
|
|
- }
|
|
|
+ (marker.visited === 1 &&
|
|
|
+ token && {
|
|
|
+ backgroundColor: Colors.WHITE,
|
|
|
+ borderWidth: 1,
|
|
|
+ borderColor: Colors.BORDER_LIGHT
|
|
|
+ }) ||
|
|
|
+ {}
|
|
|
]}
|
|
|
onPress={() => toggleSeries(marker)}
|
|
|
>
|
|
|
- {marker?.visited === 1 ? (
|
|
|
+ {marker?.visited === 1 && token ? (
|
|
|
<View style={styles.completedContainer}>
|
|
|
<CheckSvg width={14} height={14} fill={Colors.DARK_BLUE} />
|
|
|
<Text style={[styles.calloutButtonText, { color: Colors.DARK_BLUE }]}>
|
|
@@ -78,8 +82,8 @@ const MarkerItem = ({
|
|
|
<CustomCallout
|
|
|
marker={marker}
|
|
|
toggleSeries={toggleSeries}
|
|
|
- iconUrl={iconUrl}
|
|
|
seriesName={seriesName}
|
|
|
+ token={token}
|
|
|
/>
|
|
|
)}
|
|
|
</Marker>
|