Commit 9a1b54d9 by jaymehta

.

1 parent cc9ec2cf
...@@ -15,7 +15,7 @@ import { ...@@ -15,7 +15,7 @@ import {
} from "react-share"; } from "react-share";
const ShareWidget = () => { const ShareWidget = () => {
const [shareUrl, setshareUrl] = useState("asd"); const [shareUrl, setshareUrl] = useState();
const [title, settitle] = useState(""); const [title, settitle] = useState("");
const [copy, setcopy] = useState({ copied: false }); const [copy, setcopy] = useState({ copied: false });
const router = useRouter(); const router = useRouter();
......
...@@ -9,6 +9,7 @@ import { toast } from "react-toastify"; ...@@ -9,6 +9,7 @@ import { toast } from "react-toastify";
import { Loader } from "react-bootstrap-typeahead"; import { Loader } from "react-bootstrap-typeahead";
import { finishVendorOtpVerification } from "../../redux/actions/vendorActions"; import { finishVendorOtpVerification } from "../../redux/actions/vendorActions";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { Button } from "react-bootstrap";
// import { getCurrentEndUser } from "../../redux/actions/userActions"; // import { getCurrentEndUser } from "../../redux/actions/userActions";
const validationSchema = Yup.object().shape({ const validationSchema = Yup.object().shape({
...@@ -22,7 +23,7 @@ const validationSchema = Yup.object().shape({ ...@@ -22,7 +23,7 @@ const validationSchema = Yup.object().shape({
let formik1; let formik1;
const GiftCard = () => { const GiftCard = () => {
const router = useRouter() const router = useRouter();
const dispatch = useDispatch(); const dispatch = useDispatch();
// useEffect(() => { // useEffect(() => {
// dispatch(getCurrentEndUser()); // dispatch(getCurrentEndUser());
...@@ -60,6 +61,19 @@ const GiftCard = () => { ...@@ -60,6 +61,19 @@ const GiftCard = () => {
<div className="container"> <div className="container">
<div className="row justify-content-center"> <div className="row justify-content-center">
<div className="col-md-10"> <div className="col-md-10">
<div>
<Button
onClick={() => {
if (!session) {
toast.warning("Please log in to see your gift cards.");
return;
}
router.push("/user/giftcard");
}}
>
See my gift cards
</Button>
</div>
{!isResult && ( {!isResult && (
<div className="row"> <div className="row">
<div className="col-md-5"> <div className="col-md-5">
...@@ -394,9 +408,13 @@ const GiftCard = () => { ...@@ -394,9 +408,13 @@ const GiftCard = () => {
<br /> Thank you. <br /> Thank you.
</p> </p>
<div> <div>
<button className="btn btn-primary" type="button" onClick={()=>{ <button
router.push("/listing") className="btn btn-primary"
}}> type="button"
onClick={() => {
router.push("/listing");
}}
>
Browse Experiences Browse Experiences
</button> </button>
</div> </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!