l-min-components 1.0.164 → 1.0.168

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.164",
3
+ "version": "1.0.168",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -0,0 +1,46 @@
1
+ import React, { useContext, useLayoutEffect } from "react";
2
+ import { Container } from "./style";
3
+ import ErrorImage from "./errorPage.png";
4
+ import ButtonComponent from "../button";
5
+ import { useNavigate } from "react-router-dom";
6
+
7
+ const Index = () => {
8
+ // const data = useContext(OutletContext);
9
+ const navigate = useNavigate()
10
+
11
+ // useLayoutEffect(() => {
12
+ // data.setRightLayout(false);
13
+ // data.setLeftLayout(false)
14
+ // }, []);
15
+
16
+ return(
17
+ <Container>
18
+ <div className="right">
19
+ <h3>Opss...</h3>
20
+ <h2>Page not found</h2>
21
+ <p>Seems we can't find the page your looking for. Let's get you back home.</p>
22
+ <ButtonComponent
23
+ text="Go Back"
24
+ styles={{
25
+ width: "144px",
26
+ height: "50px",
27
+ background: "#FEBF10",
28
+ fontWeight: 700,
29
+ fontSize: "16px",
30
+ lineHeight: "22px",
31
+ marginTop: "20px",
32
+ }}
33
+ onClick={() => navigate(-1)}
34
+ />
35
+ </div>
36
+
37
+ <div className="left">
38
+ <img src={ErrorImage} alt="" />
39
+ </div>
40
+
41
+ </Container>
42
+
43
+ )
44
+ }
45
+
46
+ export default Index;
@@ -0,0 +1,62 @@
1
+ import styled from "styled-components"
2
+
3
+
4
+ export const Container = styled.div`
5
+ display: flex;
6
+ justify-content: space-between;
7
+ align-items: center;
8
+ background: #fff;
9
+ padding-left: 5%;
10
+ margin: -2%;
11
+ height: 94vh;
12
+
13
+ @media only screen and (max-width: 1500px) {
14
+ margin: -3%;
15
+ }
16
+
17
+ .right{
18
+ display: grid;
19
+ grid-gap: 10px;
20
+
21
+
22
+ h3{
23
+ font-family: 'Nunito';
24
+ font-style: normal;
25
+ font-weight: 800;
26
+ font-size: 40px;
27
+ line-height: 65px;
28
+ color: #313333;
29
+ }
30
+ h2{
31
+ font-family: 'Nunito';
32
+ font-style: normal;
33
+ font-weight: 500;
34
+ font-size: 38px;
35
+ line-height: 65px;
36
+ color: #313333;
37
+ }
38
+ p{
39
+ font-family: 'Inter';
40
+ font-style: normal;
41
+ font-weight: 400;
42
+ font-size: 16px;
43
+ line-height: 32px;
44
+ color: #18191F;
45
+ // width: 100%;
46
+ }
47
+
48
+ @media only screen and (max-width: 1800px) {
49
+
50
+ }
51
+ }
52
+
53
+ .left{
54
+ @media only screen and (max-width: 1336px) {
55
+ img{
56
+ width: 773px;
57
+ }
58
+ }
59
+ }
60
+
61
+ `;
62
+
@@ -429,7 +429,8 @@ export const Nav2 = styled.ul`
429
429
  export const NavGroup2 = styled.div`
430
430
  width: 50%;
431
431
  display: flex;
432
- justify-content: end;
432
+ justify-content: flex-end;
433
+ gap: 70px;
433
434
  `;
434
435
 
435
436
  export const CountryFlagGroup2 = styled.div`
@@ -440,7 +441,7 @@ export const CountryFlagGroup2 = styled.div`
440
441
  align-items: center;
441
442
  position: relative;
442
443
  width: 70px;
443
- margin: 0 70px 0 0;
444
+ margin: 0 0 0 0;
444
445
 
445
446
  & > svg {
446
447
  position: absolute;
@@ -1,9 +1,10 @@
1
- import React, { useState, useEffect, useRef } from "react";
1
+ import React, { useState, useEffect, useRef, useCallback } from "react";
2
2
  import ReactFlagsSelect from "react-flags-select";
3
3
  import logo from "./assets/images/logo.png";
4
4
  import { Navbar2, NavGroup2, Nav2, CountryFlagGroup2 } from "./index.styled";
5
5
  import { ArrowDownIcon } from "./assets/svg/arrow-down";
6
6
  import ButtonComponent from "../button";
7
+ import { useLocation, useNavigate } from "react-router-dom";
7
8
 
8
9
  /**
9
10
  * @param {{
@@ -19,12 +20,16 @@ const HeaderComponentTwo = (props) => {
19
20
  const [isOpen, setIsOpen] = useState(false);
20
21
  const [searchResultOpen, setSearchResultOpen] = useState(false);
21
22
 
22
- console.log(selected);
23
-
23
+ const navigate = useNavigate();
24
+ const location = useLocation();
25
+ console.log(location);
24
26
  useEffect(() => {
25
27
  setIsOpen(false);
26
28
  }, []);
27
29
 
30
+ const goToLogin = useCallback(() => {
31
+ navigate("/sign-in");
32
+ }, []);
28
33
  return (
29
34
  <Navbar2>
30
35
  <img src={logo} alt="Learngual logo" />
@@ -55,7 +60,9 @@ const HeaderComponentTwo = (props) => {
55
60
  <ArrowDownIcon />
56
61
  </CountryFlagGroup2>
57
62
 
58
- <ButtonComponent type="secondary" text="Log in" />
63
+ {location.pathname.includes("sign-in") && (
64
+ <ButtonComponent type="secondary" text="Log in" onClick={goToLogin} />
65
+ )}
59
66
  </NavGroup2>
60
67
  </Navbar2>
61
68
  );
@@ -25,3 +25,4 @@ export { default as SelectDropdownGraph } from "./graph";
25
25
  export { default as NotificationThresholdComponent } from "./notificationThreshold";
26
26
  export { default as DevAPIdocs } from "./developerAPIdocs";
27
27
  export { default as Calender } from "./calender/input";
28
+ export { default as ErrorPage } from "./errorPage";