@geops/rvf-mobility-web-component 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@geops/rvf-mobility-web-component",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
4
|
"description": "Web components for rvf in the domains of mobility and logistics.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.19",
|
|
6
6
|
"homepage": "https://rvf-mobility-web-component-geops.vercel.app/",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "index.js",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Feature } from "ol";
|
|
2
2
|
|
|
3
|
+
import RvfButton from "../../../RvfButton";
|
|
3
4
|
import { PROVIDER_BY_FEED_ID } from "../../../utils/constants";
|
|
4
5
|
import getLinkByDevice from "../../../utils/getLinkByDevice";
|
|
5
6
|
|
|
@@ -47,8 +48,7 @@ function FloatingVehiclesDetails({ features }: FloatingVehiclesDetailsProps) {
|
|
|
47
48
|
});
|
|
48
49
|
|
|
49
50
|
const feedId = features?.[0].get("feed_id");
|
|
50
|
-
const link = getLinkByDevice(features[0]);
|
|
51
|
-
console.log("FloatingVehiclesDetails", feedId, link);
|
|
51
|
+
const link = getLinkByDevice(features?.[0]);
|
|
52
52
|
|
|
53
53
|
return (
|
|
54
54
|
<div className="flex flex-col overflow-scroll">
|
|
@@ -59,12 +59,14 @@ function FloatingVehiclesDetails({ features }: FloatingVehiclesDetailsProps) {
|
|
|
59
59
|
</ul>
|
|
60
60
|
{feedId && link && (
|
|
61
61
|
<a
|
|
62
|
-
className="mx-auto
|
|
63
|
-
href={
|
|
62
|
+
className="mx-auto text-grey hover:text-red"
|
|
63
|
+
href={link}
|
|
64
64
|
rel="noreferrer"
|
|
65
65
|
target="_blank"
|
|
66
66
|
>
|
|
67
|
-
|
|
67
|
+
<RvfButton className={"border-none"}>
|
|
68
|
+
Über {PROVIDER_BY_FEED_ID[feedId]}
|
|
69
|
+
</RvfButton>
|
|
68
70
|
</a>
|
|
69
71
|
)}
|
|
70
72
|
</div>
|
package/src/utils/constants.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Feature } from "ol";
|
|
2
2
|
|
|
3
3
|
function getLinkByDevice(feature: Feature): string {
|
|
4
|
-
const iosLink = feature
|
|
5
|
-
const androidLink = feature
|
|
6
|
-
const webLink = feature
|
|
4
|
+
const iosLink = feature?.get("rental_uris_ios");
|
|
5
|
+
const androidLink = feature?.get("rental_uris_android");
|
|
6
|
+
const webLink = feature?.get("rental_uris_web");
|
|
7
7
|
if (
|
|
8
8
|
iosLink &&
|
|
9
9
|
(navigator.userAgent.includes("iPhone") ||
|