This commit is contained in:
priyanshuvish
2024-10-25 19:52:08 +05:30
5 changed files with 18 additions and 14 deletions

View File

@@ -65,9 +65,9 @@ const App = () => {
<Router>
<Routes>
{/* <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-email-address" element={<LoginEmailAddress />} />
<Route path="/" element={<LoginEmailAddress />} />
<Route path="/login-otp" element={<LoginEmailOtp />} />
<Route path="/register-otp" element={<RegisterOtp />} />
<Route path="/ekyc" element={<LoginEkyc />} />

View File

@@ -74,7 +74,7 @@ const HeaderMain = ({
style={{ width: 95 }}
src={mainLogo}
alt="Logo"
// onClick={() => navigate("/")}
onClick={() => navigate("/home")}
cursor={"pointer"}
/>
</Box>

View File

@@ -27,13 +27,6 @@ const MyGiftCardsTab = () => {
return () => clearTimeout(timer);
}, []);
// Table headers
const tableHeadRow = [
"Transaction Type",
"Date",
"Wallet Type",
"Amount Spent",
];
const InternalCard = ({ title1, subTitle1, title2, subbTitle2 }) => {
return (
@@ -67,6 +60,14 @@ const MyGiftCardsTab = () => {
);
};
// Table headers
const tableHeadRow = [
"Transaction Type",
"Date",
"Wallet Type",
"Amount Spent",
];
// Extracted data for table
const extractedArray = requestsTable.map((item, index) => ({
"Transaction Type": (

View File

@@ -1,5 +1,5 @@
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 SecondaryButton from '../../Components/Buttons/SecondaryButton';
import { HiOutlineMail } from "react-icons/hi";
@@ -18,6 +18,7 @@ const emailValidation = Yup.object().shape({
});
const LoginEmailAddress = () => {
const toast = useToast()
const navigate = useNavigate();
const [ isLoading, setIsLoading ] = useState(false)
@@ -109,7 +110,7 @@ const LoginEmailAddress = () => {
</HStack>
<HStack justifyContent={"center"} mt={4}>
<Text fontSize={"xs"} fontWeight={500} mb={0}>Dont 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 spacing={4} my={8}>
<Divider />

View File

@@ -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 PrimaryButton from '../../Components/Buttons/PrimaryButton';
import LoginOtpFrame from './LoginOtpFrame';
import { useNavigate } from 'react-router-dom';
import Cookies from 'js-cookie';
import ToastBox from '../../Components/ToastBox';
import GlobalStateContext from '../../Contexts/GlobalStateContext';
const LoginOtp = () => {
const [otp, setOtp] = useState("");
const [ isLoading, setIsLoading ] = useState(false)
const { isAuthenticate, setIsAuthenticate } = useContext(GlobalStateContext);
const navigate = useNavigate();
const toast = useToast();
@@ -33,7 +35,7 @@ const LoginOtp = () => {
<ToastBox status={"success"} message={"Login Successfully"} />
),
});
setIsAuthenticate(true)
Cookies.set("isAuthenticated", true, { expires: 7 });
navigate("/home");
}, 2000); // 2-second delay