@stokr/components-library 3.1.0-alpha.1 → 3.1.1
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,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState, useEffect } from "react";
|
|
3
|
-
import { createGlobalStyle } from "styled-components";
|
|
1
|
+
import { useEffect, useLayoutEffect } from "react";
|
|
4
2
|
import IoniconsWOFF2 from "../static/fonts/Ionicons/Ionicons.woff2.js";
|
|
5
3
|
import IoniconsWOFF from "../static/fonts/Ionicons/Ionicons.woff.js";
|
|
6
4
|
import IoniconsTTF from "../static/fonts/Ionicons/Ionicons.ttf.js";
|
|
7
5
|
import ioniconsCss from "../static/fonts/Ionicons/ionicons.min.css.js";
|
|
8
|
-
const
|
|
6
|
+
const IONICONS_STYLE_ID = "stokr-ionicons";
|
|
7
|
+
const ioniconsStyleText = `
|
|
9
8
|
@font-face {
|
|
10
9
|
font-family: 'Ionicons';
|
|
11
10
|
src:
|
|
@@ -18,13 +17,17 @@ const IoniconsGlobalStyle = createGlobalStyle`
|
|
|
18
17
|
|
|
19
18
|
${ioniconsCss}
|
|
20
19
|
`;
|
|
21
|
-
|
|
20
|
+
function injectIonicons() {
|
|
21
|
+
if (document.getElementById(IONICONS_STYLE_ID)) return;
|
|
22
|
+
const style = document.createElement("style");
|
|
23
|
+
style.id = IONICONS_STYLE_ID;
|
|
24
|
+
style.textContent = ioniconsStyleText;
|
|
25
|
+
document.head.appendChild(style);
|
|
26
|
+
}
|
|
27
|
+
const useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
22
28
|
function IoniconsStyles() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (shouldRender) injected = true;
|
|
26
|
-
}, [shouldRender]);
|
|
27
|
-
return shouldRender ? /* @__PURE__ */ jsx(IoniconsGlobalStyle, {}) : null;
|
|
29
|
+
useIsomorphicLayoutEffect(injectIonicons, []);
|
|
30
|
+
return null;
|
|
28
31
|
}
|
|
29
32
|
export {
|
|
30
33
|
IoniconsStyles
|
|
@@ -126,7 +126,7 @@ function generateCoreChecklistTasks(user) {
|
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
const { country, user_type, wallets = [], self_declaration, countryObj, taxId } = user;
|
|
129
|
-
const isFromAllowedCountry = countryObj?.isAllowed;
|
|
129
|
+
const isFromAllowedCountry = Boolean(countryObj?.isAllowed) || Boolean(user.allowedByBoardResolution);
|
|
130
130
|
const liquidWallets = wallets.filter((wallet2) => wallet2.type === walletTypes.LIQUID) || [];
|
|
131
131
|
const hasWallet = liquidWallets.length > 0;
|
|
132
132
|
const isEntity = user_type === UserTypes.investor_entity;
|