generated from dwd/boilarplate-astro-tailwind
add env file
parent
14d7041e87
commit
b528567844
|
@ -1,2 +1 @@
|
||||||
/// <reference types="astro/client" />
|
/// <reference types="astro/client" />
|
||||||
/// <reference path="content.d.ts" />
|
|
|
@ -18,3 +18,6 @@ pnpm-debug.log*
|
||||||
|
|
||||||
# macOS-specific files
|
# macOS-specific files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
# env variables
|
||||||
|
.env
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
PUBLIC_API_KEY=1234567890abcdef
|
||||||
|
PUBLIC_SECRET_KEY=my-secret-key
|
|
@ -9,7 +9,6 @@ import { TOKEN_NAME } from "../../utils/constants";
|
||||||
|
|
||||||
useNavigate;
|
useNavigate;
|
||||||
|
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
import { toast } from "react-toastify";
|
import { toast } from "react-toastify";
|
||||||
|
|
||||||
const EmailVerification = ({
|
const EmailVerification = ({
|
||||||
|
@ -17,7 +16,6 @@ const EmailVerification = ({
|
||||||
dataSet,
|
dataSet,
|
||||||
showFromPublicRoute = true,
|
showFromPublicRoute = true,
|
||||||
}) => {
|
}) => {
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const [showSendOtp, setShowSendOtp] = React.useState(true);
|
const [showSendOtp, setShowSendOtp] = React.useState(true);
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { unwrapResult } from "@reduxjs/toolkit";
|
||||||
import { useFormik } from "formik";
|
import { useFormik } from "formik";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
// import { useNavigate } from "react-router-dom";
|
|
||||||
import { toast } from "react-toastify";
|
import { toast } from "react-toastify";
|
||||||
import validator from "validator";
|
import validator from "validator";
|
||||||
import BuzzInput from "../BuzzInput/BuzzInput";
|
import BuzzInput from "../BuzzInput/BuzzInput";
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { makeStyles } from "@mui/styles";
|
||||||
import { unwrapResult } from "@reduxjs/toolkit";
|
import { unwrapResult } from "@reduxjs/toolkit";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { Link, useNavigate } from "react-router-dom";
|
|
||||||
import { toast } from "react-toastify";
|
import { toast } from "react-toastify";
|
||||||
import validator from "validator";
|
import validator from "validator";
|
||||||
import BuzzInput from "../../../components/BuzzInput/BuzzInput";
|
import BuzzInput from "../../../components/BuzzInput/BuzzInput";
|
||||||
|
@ -105,9 +104,9 @@ const SignUpScreen = () => {
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography fontSize="medium" className={classes.greyText}>
|
<Typography fontSize="medium" className={classes.greyText}>
|
||||||
Already have an account?{" "}
|
Already have an account?{" "}
|
||||||
<Link style={{ cursor: "pointer" }} to="/signin" color="primary">
|
<a style={{ cursor: "pointer" }} href="/signin" color="primary">
|
||||||
SignIn
|
SignIn
|
||||||
</Link>
|
</a>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Box
|
<Box
|
||||||
width={420}
|
width={420}
|
||||||
|
|
|
@ -19,6 +19,7 @@ function Home() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.scrollTo({ top: 0, behavior: "instant" });
|
window.scrollTo({ top: 0, behavior: "instant" });
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<section className={style.section1}>
|
<section className={style.section1}>
|
||||||
|
|
|
@ -5,3 +5,6 @@ export const API_BASE_BUZZ = import.meta.env.VITE_BUZZ_BASE_URL;
|
||||||
|
|
||||||
export const AUTH_TOKEN = () => localStorage.getItem(TOKEN_NAME);
|
export const AUTH_TOKEN = () => localStorage.getItem(TOKEN_NAME);
|
||||||
export const SCHOOL_ID = () => localStorage.getItem("SCHOOL_ID");
|
export const SCHOOL_ID = () => localStorage.getItem("SCHOOL_ID");
|
||||||
|
|
||||||
|
console.log('TestENV', import.meta.env.PUBLIC_API_KEY);
|
||||||
|
console.log('TestENV', import.meta.env.PUBLIC_SECRET_KEY);
|
||||||
|
|
|
@ -14,7 +14,6 @@ import Header from "../../../components/Header/Header";
|
||||||
import CartSummaryCard from "../components/CartSummaryCard/CartSummaryCard";
|
import CartSummaryCard from "../components/CartSummaryCard/CartSummaryCard";
|
||||||
|
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
import {
|
import {
|
||||||
clearPurchaseCart,
|
clearPurchaseCart,
|
||||||
initiatePayment,
|
initiatePayment,
|
||||||
|
@ -25,7 +24,6 @@ import style from "./PaymentPage.module.css";
|
||||||
|
|
||||||
function PaymentPage() {
|
function PaymentPage() {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
const { purchaseDetails, userDetails } = useSelector(({ purchase }) => {
|
const { purchaseDetails, userDetails } = useSelector(({ purchase }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -72,7 +70,8 @@ function PaymentPage() {
|
||||||
if (res.status === "success") {
|
if (res.status === "success") {
|
||||||
setPhase(3);
|
setPhase(3);
|
||||||
dispatch(clearPurchaseCart());
|
dispatch(clearPurchaseCart());
|
||||||
navigate("/purchase/confirmation");
|
// navigate("/purchase/confirmation");
|
||||||
|
window.location.href = "/purchase/confirmation";
|
||||||
|
|
||||||
breakFlag = true;
|
breakFlag = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,12 @@ import React from "react";
|
||||||
|
|
||||||
import { ArrowForwardOutlined } from "@mui/icons-material";
|
import { ArrowForwardOutlined } from "@mui/icons-material";
|
||||||
import { Button } from "@mui/material";
|
import { Button } from "@mui/material";
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
import style from "./PurchaseConfirmationPage.module.css";
|
import style from "./PurchaseConfirmationPage.module.css";
|
||||||
|
|
||||||
function PurchaseConfirmationPage() {
|
function PurchaseConfirmationPage() {
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
const redirectToHome = () => {
|
const redirectToHome = () => {
|
||||||
navigate("/");
|
window.location.href = "/";
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -9,7 +9,6 @@ import Header from "../../../components/Header/Header";
|
||||||
import CartSummaryCard from "../components/CartSummaryCard/CartSummaryCard";
|
import CartSummaryCard from "../components/CartSummaryCard/CartSummaryCard";
|
||||||
|
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
import { toast } from "react-toastify";
|
import { toast } from "react-toastify";
|
||||||
import {
|
import {
|
||||||
postVerificationSteps,
|
postVerificationSteps,
|
||||||
|
@ -23,7 +22,6 @@ import style from "./UserVerification.module.css";
|
||||||
|
|
||||||
function UserVerificationPage() {
|
function UserVerificationPage() {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
const { purchaseDetails, userDetails, isUserVerified } = useSelector(
|
const { purchaseDetails, userDetails, isUserVerified } = useSelector(
|
||||||
({ purchase, auth }) => {
|
({ purchase, auth }) => {
|
||||||
|
@ -75,7 +73,7 @@ function UserVerificationPage() {
|
||||||
};
|
};
|
||||||
|
|
||||||
const navigateToNextPage = () => {
|
const navigateToNextPage = () => {
|
||||||
navigate("/purchase/payment");
|
window.location.href = "/purchase/payment";
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue