l-min-components 1.0.773 → 1.0.779

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.0.773",
3
+ "version": "1.0.779",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -8,6 +8,7 @@ import {
8
8
  DropDownHeader,
9
9
  DropDownItem,
10
10
  } from "./styles";
11
+ import useTranslation from "../../hooks/useTranslation";
11
12
  /**
12
13
  * @param {{
13
14
  * dropdownData: Array,
@@ -80,18 +81,21 @@ const DropDownComponent = (props) => {
80
81
  }
81
82
  }, [props.dropdownData]);
82
83
 
84
+ const { textSchema, findText } = useTranslation();
85
+
83
86
  return (
87
+ textSchema &&
84
88
  <DropDownContainer
85
89
  className={props?.className}
86
90
  ref={dropdownRef}
87
91
  onMouseEnter={() => props.toggleOnHover && setDropdown(true)}
88
92
  onMouseLeave={() => props.toggleOnHover && setDropdown(false)}
89
93
  >
90
- <DropDownHeader>{props?.header}</DropDownHeader>
94
+ <DropDownHeader>{findText(props?.header)}</DropDownHeader>
91
95
  <DropDownControls>
92
96
  {props?.searchable ? (
93
97
  <ControlInput
94
- placeholder={props?.inputPlaceHolder || "Select Dropdown"}
98
+ placeholder={findText(props?.inputPlaceHolder) || "Select Dropdown"}
95
99
  type="text"
96
100
  value={props?.valueSelect?.name || selected?.name}
97
101
  onChange={(e) => {
@@ -105,7 +109,7 @@ const DropDownComponent = (props) => {
105
109
  <p onClick={handleDropdownToggle}>
106
110
  {props?.valueSelect?.name ||
107
111
  selected?.name ||
108
- props?.inputPlaceHolder}
112
+ findText(props?.inputPlaceHolder)}
109
113
  </p>
110
114
  )}
111
115
  {/* <DownIcon onClick={() => setDropdown(!dropdown)} /> */}
@@ -7,6 +7,7 @@ import {
7
7
  RadioLabel,
8
8
  RadioWrapper,
9
9
  } from "./styles";
10
+ import useTranslation from "../../hooks/useTranslation";
10
11
 
11
12
  const Radio = ({
12
13
  options,
@@ -22,8 +23,9 @@ const Radio = ({
22
23
  setValue(newValue);
23
24
  onChange && onChange(newValue);
24
25
  };
25
-
26
+ const { textSchema, findText } = useTranslation();
26
27
  return (
28
+ textSchema &&
27
29
  <Container direction={direction} {...props}>
28
30
  {options.map((option) => (
29
31
  <RadioWrapper key={option.value}>
@@ -41,7 +43,7 @@ const Radio = ({
41
43
  checked={value === option.value}
42
44
  {...props}
43
45
  >
44
- {option.label}
46
+ {findText(option.label)}
45
47
  </RadioLabel>
46
48
  </RadioWrapper>
47
49
  ))}
@@ -44,6 +44,8 @@ const SideMenu = ({
44
44
  // Normal route filter
45
45
  const [filteredRoutes, setFilteredRoutes] = useState();
46
46
 
47
+ const isPersonal = generalData?.selectedAccount?.type === "PERSONAL" && window.location.hostname.includes("staging")
48
+
47
49
  useEffect(() => {
48
50
  if (userType) {
49
51
  setFilteredRoutes(
@@ -301,10 +303,7 @@ const SideMenu = ({
301
303
  )}
302
304
  minimal={isOpen}
303
305
  >
304
- {!(
305
- window.location.hostname.includes("personal") &&
306
- window.location.hostname.includes("staging")
307
- ) && (
306
+ {!isPersonal && (
308
307
  <>
309
308
  <IconContainer active={active}>
310
309
  {active ? iconActive : icon}