-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Finishes user pay cart * --ammend * --amend * -ammend * Merge Errors * --ammend * --ammend
- Loading branch information
1 parent
6beacdd
commit bbbb476
Showing
6 changed files
with
706 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* eslint-disable */ | ||
import React, { useEffect, useState } from 'react'; | ||
import { Meta } from '../components/Meta'; | ||
import { useAppDispatch, useAppSelector } from '../store/store'; | ||
import { PuffLoader, PulseLoader } from 'react-spinners'; | ||
import { toast } from 'react-toastify'; | ||
import { checkout, getUserCarts } from '../store/features/carts/cartSlice'; | ||
import { | ||
FaCheckSquare, | ||
FaMinus, | ||
FaPlus, | ||
FaEdit, | ||
FaTrash, | ||
FaGift, | ||
FaShippingFast, | ||
} from 'react-icons/fa'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import Product from '../components/product/Product'; | ||
import { Box, LinearProgress } from '@mui/material'; | ||
import { useLocation } from 'react-router-dom'; | ||
|
||
const UserCartPaymentSuccess: React.FC = () => { | ||
const dispatch = useAppDispatch(); | ||
const [isLoading, setIsLoading] = useState(true); | ||
const [currentEndpoint, setCurrentEndpoint] = useState(''); | ||
const navigate = useNavigate(); | ||
const location = useLocation(); | ||
|
||
useEffect(() => { | ||
toast.success('Cart payment success'); | ||
navigate('/shopping-cart'); | ||
}, [location.search, navigate]); | ||
|
||
return ( | ||
<> | ||
<Meta title="Cart payment success - E-Commerce Ninjas" /> | ||
<div className="loader"> | ||
<PuffLoader color="#ff6d18" size={300} loading={isLoading} /> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default UserCartPaymentSuccess; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.