l-min-components 1.0.592 → 1.0.598
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
|
@@ -49,8 +49,9 @@ export const RadioControl = styled.span`
|
|
|
49
49
|
|
|
50
50
|
export const RadioLabel = styled.span`
|
|
51
51
|
margin-left: 8px;
|
|
52
|
-
font-size:
|
|
53
|
-
|
|
52
|
+
font-size: ${(props) =>
|
|
53
|
+
props.labelSize ? props.labelSize : "16px"};
|
|
54
|
+
font-weight: 700;
|
|
54
55
|
color: ${(props) =>
|
|
55
56
|
props.checked ? props.color : "rgba(159, 159, 159, 0.365)"};
|
|
56
|
-
`;
|
|
57
|
+
`;
|
|
@@ -25,19 +25,19 @@ const SideMenu = ({
|
|
|
25
25
|
isOpen,
|
|
26
26
|
setIsOpen,
|
|
27
27
|
affiliatesActive,
|
|
28
|
-
setRightComponent
|
|
28
|
+
setRightComponent,
|
|
29
29
|
}) => {
|
|
30
|
-
console.log(
|
|
30
|
+
console.log("user type", userType);
|
|
31
31
|
// const [isOpen, setIsOpen] = useState(false);
|
|
32
32
|
|
|
33
|
-
const {setGeneralData, generalData} = useContext(OutletContext)
|
|
33
|
+
const { setGeneralData, generalData } = useContext(OutletContext);
|
|
34
34
|
const onToggle = () => {
|
|
35
35
|
setIsOpen(!isOpen);
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
useEffect(()=>{
|
|
39
|
-
setGeneralData({...generalData, isOpen})
|
|
40
|
-
}, [isOpen])
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
setGeneralData({ ...generalData, isOpen });
|
|
40
|
+
}, [isOpen]);
|
|
41
41
|
|
|
42
42
|
// Normal route filter
|
|
43
43
|
const filteredRoutes = routes.find(
|
|
@@ -58,13 +58,14 @@ const SideMenu = ({
|
|
|
58
58
|
setRouteFilter(filteredRoutes);
|
|
59
59
|
}
|
|
60
60
|
}, [affiliatesActive]);
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
// Right bars
|
|
63
|
-
const EnterpriseRight = <EnterpriseRightBar
|
|
64
|
-
const InstructorRight
|
|
63
|
+
const EnterpriseRight = <EnterpriseRightBar />;
|
|
64
|
+
const InstructorRight = <InstructorRightBar />;
|
|
65
65
|
|
|
66
66
|
const renderNavigationItem = (route, index) => {
|
|
67
|
-
const { icon, iconActive, text, notifications, path, affiliates } =
|
|
67
|
+
const { icon, iconActive, text, notifications, path, affiliates, newTab } =
|
|
68
|
+
route;
|
|
68
69
|
const handlePathCheck = () => {
|
|
69
70
|
let statusText;
|
|
70
71
|
console.log(window.location.pathname, "pathname");
|
|
@@ -248,14 +249,20 @@ const SideMenu = ({
|
|
|
248
249
|
window.location.hostname.includes("staging") &&
|
|
249
250
|
window.location.hostname.includes("developer")
|
|
250
251
|
) {
|
|
251
|
-
|
|
252
|
+
newTab
|
|
253
|
+
? window.open(path, "_blank")
|
|
254
|
+
: (window.location.href = `https://developer-staging-01.learngual.com${path}`);
|
|
252
255
|
} else if (window.location.hostname.includes("localhost")) {
|
|
253
|
-
|
|
256
|
+
newTab
|
|
257
|
+
? window.open(path, "_blank")
|
|
258
|
+
: (window.location.href = `http://localhost:${window.location.port}${path}`);
|
|
254
259
|
} else if (
|
|
255
260
|
window.location.hostname.includes("developer") &&
|
|
256
261
|
!window.location.hostname.includes("staging")
|
|
257
262
|
) {
|
|
258
|
-
|
|
263
|
+
newTab
|
|
264
|
+
? window.open(path, "_blank")
|
|
265
|
+
: (window.location.href = `https://developer.learngual.com${path}`);
|
|
259
266
|
}
|
|
260
267
|
|
|
261
268
|
// if (window.location.hostname.includes("staging")) {
|
|
@@ -100,7 +100,7 @@ export const sideMenuOptions = [
|
|
|
100
100
|
// notifications: 2,
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
|
-
path: "
|
|
103
|
+
path: "https://developer.learngual.com",
|
|
104
104
|
icon: <DocumentIcon />,
|
|
105
105
|
iconActive: <DocumentIconActive />,
|
|
106
106
|
text: "Documentation",
|