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