Merge branch 'main' of http://git.wdipl.com/Siddhesh.More/optifii-employee
This commit is contained in:
@@ -65,9 +65,9 @@ const App = () => {
|
|||||||
<Router>
|
<Router>
|
||||||
<Routes>
|
<Routes>
|
||||||
{/* <Route path="/login" element={<Login />} /> */}
|
{/* <Route path="/login" element={<Login />} /> */}
|
||||||
<Route path="/" element={<WelcomeToOptifii />} />
|
<Route path="/welcome-screen" element={<WelcomeToOptifii />} />
|
||||||
<Route path="/login-phone-number" element={<LoginPhoneNumber />} />
|
<Route path="/login-phone-number" element={<LoginPhoneNumber />} />
|
||||||
<Route path="/login-email-address" element={<LoginEmailAddress />} />
|
<Route path="/" element={<LoginEmailAddress />} />
|
||||||
<Route path="/login-otp" element={<LoginEmailOtp />} />
|
<Route path="/login-otp" element={<LoginEmailOtp />} />
|
||||||
<Route path="/register-otp" element={<RegisterOtp />} />
|
<Route path="/register-otp" element={<RegisterOtp />} />
|
||||||
<Route path="/ekyc" element={<LoginEkyc />} />
|
<Route path="/ekyc" element={<LoginEkyc />} />
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const HeaderMain = ({
|
|||||||
style={{ width: 95 }}
|
style={{ width: 95 }}
|
||||||
src={mainLogo}
|
src={mainLogo}
|
||||||
alt="Logo"
|
alt="Logo"
|
||||||
// onClick={() => navigate("/")}
|
onClick={() => navigate("/home")}
|
||||||
cursor={"pointer"}
|
cursor={"pointer"}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -27,13 +27,6 @@ const MyGiftCardsTab = () => {
|
|||||||
return () => clearTimeout(timer);
|
return () => clearTimeout(timer);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Table headers
|
|
||||||
const tableHeadRow = [
|
|
||||||
"Transaction Type",
|
|
||||||
"Date",
|
|
||||||
"Wallet Type",
|
|
||||||
"Amount Spent",
|
|
||||||
];
|
|
||||||
|
|
||||||
const InternalCard = ({ title1, subTitle1, title2, subbTitle2 }) => {
|
const InternalCard = ({ title1, subTitle1, title2, subbTitle2 }) => {
|
||||||
return (
|
return (
|
||||||
@@ -67,6 +60,14 @@ const MyGiftCardsTab = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Table headers
|
||||||
|
const tableHeadRow = [
|
||||||
|
"Transaction Type",
|
||||||
|
"Date",
|
||||||
|
"Wallet Type",
|
||||||
|
"Amount Spent",
|
||||||
|
];
|
||||||
// Extracted data for table
|
// Extracted data for table
|
||||||
const extractedArray = requestsTable.map((item, index) => ({
|
const extractedArray = requestsTable.map((item, index) => ({
|
||||||
"Transaction Type": (
|
"Transaction Type": (
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Box, Input, Button, Text, HStack, Link, Container, InputGroup, InputLeftElement, Divider, FormControl, FormLabel, FormErrorMessage } from '@chakra-ui/react';
|
import { Box, Input, Button, Text, HStack, Link, Container, InputGroup, InputLeftElement, Divider, FormControl, FormLabel, FormErrorMessage, useToast } from '@chakra-ui/react';
|
||||||
import PrimaryButton from '../../Components/Buttons/PrimaryButton';
|
import PrimaryButton from '../../Components/Buttons/PrimaryButton';
|
||||||
import SecondaryButton from '../../Components/Buttons/SecondaryButton';
|
import SecondaryButton from '../../Components/Buttons/SecondaryButton';
|
||||||
import { HiOutlineMail } from "react-icons/hi";
|
import { HiOutlineMail } from "react-icons/hi";
|
||||||
@@ -18,6 +18,7 @@ const emailValidation = Yup.object().shape({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const LoginEmailAddress = () => {
|
const LoginEmailAddress = () => {
|
||||||
|
const toast = useToast()
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [ isLoading, setIsLoading ] = useState(false)
|
const [ isLoading, setIsLoading ] = useState(false)
|
||||||
|
|
||||||
@@ -109,7 +110,7 @@ const LoginEmailAddress = () => {
|
|||||||
</HStack>
|
</HStack>
|
||||||
<HStack justifyContent={"center"} mt={4}>
|
<HStack justifyContent={"center"} mt={4}>
|
||||||
<Text fontSize={"xs"} fontWeight={500} mb={0}>Don’t have an account?</Text>
|
<Text fontSize={"xs"} fontWeight={500} mb={0}>Don’t have an account?</Text>
|
||||||
<Link fontSize={"xs"} fontWeight={600} mb={0} color={"#3725EA"}>Signup</Link>
|
<Link onClick={()=> navigate('/welcome-screen')} fontSize={"xs"} fontWeight={600} mb={0} color={"#3725EA"}>Signup</Link>
|
||||||
</HStack>
|
</HStack>
|
||||||
<HStack spacing={4} my={8}>
|
<HStack spacing={4} my={8}>
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useContext, useState } from 'react';
|
||||||
import { Box, PinInput, PinInputField, Text, HStack, Container, useToast } from '@chakra-ui/react';
|
import { Box, PinInput, PinInputField, Text, HStack, Container, useToast } from '@chakra-ui/react';
|
||||||
import PrimaryButton from '../../Components/Buttons/PrimaryButton';
|
import PrimaryButton from '../../Components/Buttons/PrimaryButton';
|
||||||
import LoginOtpFrame from './LoginOtpFrame';
|
import LoginOtpFrame from './LoginOtpFrame';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import ToastBox from '../../Components/ToastBox';
|
import ToastBox from '../../Components/ToastBox';
|
||||||
|
import GlobalStateContext from '../../Contexts/GlobalStateContext';
|
||||||
|
|
||||||
const LoginOtp = () => {
|
const LoginOtp = () => {
|
||||||
|
|
||||||
const [otp, setOtp] = useState("");
|
const [otp, setOtp] = useState("");
|
||||||
const [ isLoading, setIsLoading ] = useState(false)
|
const [ isLoading, setIsLoading ] = useState(false)
|
||||||
|
const { isAuthenticate, setIsAuthenticate } = useContext(GlobalStateContext);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
|
||||||
@@ -33,7 +35,7 @@ const LoginOtp = () => {
|
|||||||
<ToastBox status={"success"} message={"Login Successfully"} />
|
<ToastBox status={"success"} message={"Login Successfully"} />
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
setIsAuthenticate(true)
|
||||||
Cookies.set("isAuthenticated", true, { expires: 7 });
|
Cookies.set("isAuthenticated", true, { expires: 7 });
|
||||||
navigate("/home");
|
navigate("/home");
|
||||||
}, 2000); // 2-second delay
|
}, 2000); // 2-second delay
|
||||||
|
|||||||
Reference in New Issue
Block a user