ublo-lib 1.0.13 → 1.0.16

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.
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import * as ReactDOM from "react-dom";
3
- import Popup from "../popup";
3
+ import Popup from "../../../common/components/popup";
4
4
  import VaxPassIcon from "./vax-pass-icon";
5
5
  import MaskIcon from "./mask-icon";
6
6
  import css from "./index.module.css";
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import * as ReactDOM from "react-dom";
3
- import Popup from "../../popup";
3
+ import Popup from "../../../../common/components/popup";
4
4
  import Button from "dt-design-system/es/button";
5
5
  import * as DTIcons from "dt-design-system/es/icons";
6
6
  import Field from "./field";
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import * as ReactDOM from "react-dom";
3
- import Popup from "../../popup";
3
+ import Popup from "../../../../common/components/popup";
4
4
  import Field from "./field";
5
5
  import Button from "dt-design-system/es/button";
6
6
  import * as DTIcons from "dt-design-system/es/icons";
@@ -0,0 +1,30 @@
1
+ import * as React from "react";
2
+ import { useEffect } from "react";
3
+ import { loadJS } from "../../common/utils/load-js";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+
6
+ const Reviews = ({
7
+ lang,
8
+ resort,
9
+ selector = "reviews"
10
+ }) => {
11
+ const reviewsLang = lang === "fr" ? "fr" : "en";
12
+ useEffect(() => {
13
+ const run = async () => {
14
+ await loadJS("https://reviews.msem.tech/static/js/widget-msem-reviews.js", `msem-${selector}-script`);
15
+ window.openReviews({
16
+ language: reviewsLang,
17
+ school: resort,
18
+ containerId: selector,
19
+ useDefaultCSS: true
20
+ });
21
+ };
22
+
23
+ resort && setTimeout(run, 3000);
24
+ }, [resort, reviewsLang]);
25
+ return _jsx("div", {
26
+ id: selector
27
+ });
28
+ };
29
+
30
+ export default Reviews;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
4
4
  "peerDependencies": {
5
5
  "react": "^18.2.0",
6
6
  "react-dom": "^18.2.0",