Commit 90695a54 by jaymehta

.

1 parent 1eec64c6
......@@ -179,7 +179,6 @@ const Reviews = ({ isVendor }) => {
};
})
);
// dispatch(getActivitiesByFilters({}));
}, [reviews]);
return (
......
......@@ -89,7 +89,6 @@ const ReviewsListing = ({ activityId, setshowReviews, isVendor }) => {
onClick={async () => {
const res = await deleteReview({ reviewId });
dispatch(getReviewsAction({ activityId }));
// dispatch(getActivitiesByFilters({}));
toast.success("Review deleted");
setshowModal(false);
// console.log(res);
......
......@@ -24,7 +24,7 @@ const SearchBar = () => {
<Typeahead
open={open}
id="select"
placeholder="Search for products, brands or categories"
placeholder="Search for experiences or categories"
onBlur={() => {
setopen(false);
}}
......
......@@ -11,11 +11,12 @@ import { getWishlists } from "../../redux/actions/activityAction";
import { Typeahead } from "react-bootstrap-typeahead";
import axios from "axios";
import ActiveLink from "../common/ActiveLink";
import { Skeleton } from "antd";
const Header = () => {
const [isGridViewOpen, setIsGridViewOpen] = useState(false);
const { loadedUser } = useSelector(state => state.loadedUser);
const { endUser } = useSelector(state => state.endUser);
const { endUser, loading } = useSelector(state => state.endUser);
const [open, setopen] = useState(false);
const [options, setoptions] = useState([]);
// console.log("options", options);
......@@ -79,7 +80,9 @@ const Header = () => {
</div>
<div className="">
<div className="name">John Doe</div>
<div className="view-profile"><a href="">View Profile</a></div>
<div className="view-profile">
<a href="">View Profile</a>
</div>
</div>
</div>
<div className="user-item">
......@@ -109,11 +112,13 @@ const Header = () => {
</a>
</li>
<li>
<a onClick={async () => {
signOut({ redirect: false });
await router.push("/");
window.location.reload();
}}>
<a
onClick={async () => {
signOut({ redirect: false });
await router.push("/");
window.location.reload();
}}
>
<span className="image-container">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/logout.svg" />
</span>
......@@ -122,7 +127,6 @@ const Header = () => {
</li>
</ul>
</div>
</div>
</div>
{/* <Button
......@@ -192,7 +196,7 @@ const Header = () => {
setopen(false);
}}
id="select"
placeholder="Search for products, brands or categories"
placeholder="Search for experiences or categories"
onChange={selected => {
console.log("selected", selected);
// router.push("/listing");
......@@ -249,75 +253,79 @@ const Header = () => {
</Button>
</div>
</Form>
{/* {console.log(user.id)} */}
{loadedUser && loadedUser.id ? (
<div className="top-btn hide-on-mobile">
<div className="logout-bk">
<a onClick={toggleGridViewDropdown} className="user-icon">
<span className="image-container user-pic">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/user.svg" />
</span>
<span className="image-container arrow-d">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/user-arrow-down.svg" />
</span>
</a>
{/* <p>{loadedUser.phone}</p> */}
<div className={`inner-box ${isGridViewOpen ? "open" : ""}`}>
<div className="user-info">
<div className="pic">
<span className="image-container">
{!loading ? (
<>
{loadedUser && loadedUser.id ? (
<div className="top-btn hide-on-mobile">
<div className="logout-bk">
<a onClick={toggleGridViewDropdown} className="user-icon">
<span className="image-container user-pic">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/user.svg" />
</span>
</div>
<div className="">
<div className="name">John Doe</div>
<div className="view-profile"><a href="">View Profile</a></div>
</div>
</div>
<div className="user-item">
<ul>
<li>
<a href="">
<span className="image-container">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/my-booking.svg" />
</span>
My Enquires
</a>
</li>
<li>
<a href="/user/wishlist">
<span className="image-container">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/my-wishlist.svg" />
</span>
My Wishlist
</a>
</li>
<li>
<a href="/gift-card">
<span className="image-container">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/my-gift-card.svg" />
</span>
My Gift Card
</a>
</li>
<li>
<a onClick={async () => {
signOut({ redirect: false });
await router.push("/");
window.location.reload();
}}>
<span className="image-container arrow-d">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/user-arrow-down.svg" />
</span>
</a>
{/* <p>{loadedUser.phone}</p> */}
<div className={`inner-box ${isGridViewOpen ? "open" : ""}`}>
<div className="user-info">
<div className="pic">
<span className="image-container">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/logout.svg" />
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/user.svg" />
</span>
Log out
</a>
</li>
</ul>
</div>
<div className="">
<div className="name">John Doe</div>
<div className="view-profile">
<a href="">View Profile</a>
</div>
</div>
</div>
<div className="user-item">
<ul>
<li>
<a href="">
<span className="image-container">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/my-booking.svg" />
</span>
My Enquires
</a>
</li>
<li>
<a href="/user/wishlist">
<span className="image-container">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/my-wishlist.svg" />
</span>
My Wishlist
</a>
</li>
<li>
<a href="/gift-card">
<span className="image-container">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/my-gift-card.svg" />
</span>
My Gift Card
</a>
</li>
<li>
<a
onClick={async () => {
signOut({ redirect: false });
await router.push("/");
window.location.reload();
}}
>
<span className="image-container">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/logout.svg" />
</span>
Log out
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
{/* <Button
{/* <Button
onClick={async () => {
signOut({ redirect: false });
await router.push("/");
......@@ -328,27 +336,34 @@ const Header = () => {
>
Log out
</Button> */}
</div>
</div>
) : (
<div className="top-btn hide-on-mobiles">
<Button
onClick={() => {
router.push("/signup/user");
}}
className="me-3"
variant="primary"
>
Sign Up
</Button>
<Button
onClick={() => {
router.push("/login/user");
}}
className=""
variant="primary"
>
Log In
</Button>
</div>
)}
</>
) : (
<div className="top-btn hide-on-mobiles asdasd">
<Button
onClick={() => {
router.push("/signup/user");
}}
className="me-3"
variant="primary"
>
Sign Up
</Button>
<Button
onClick={() => {
router.push("/login/user");
}}
className=""
variant="primary"
>
Log In
</Button>
<div className="d-flex align-items-center gap-2">
{/* <Skeleton.Image active style={{ height: 50, width: 70 }} /> */}
<Skeleton.Button active style={{ height: 40, width: 190 }} shape={"rounded"} />
</div>
)}
</Navbar.Collapse>
......
......@@ -42,7 +42,6 @@ const LetDiscover = ({ categories }) => {
// }, [router]);
useEffect(() => {
console.log("router.query.category", router.query.category);
// console.log("getting id to filtered categoryiiiiiiiiiiifsdkhdjkskiiiiiiiiiiiiiiiiiiiiiiiii", parseInt(router.query.category))
if (router.query.category) {
dispatch(setActivityFilters({ filters: { category: Number(router.query.category), subCategories: [] } }));
......
......@@ -100,7 +100,7 @@ const ListingInner = ({ allActivitiesData, loading, totalCount }) => {
dispatch(
getActivitiesByFilters({
subCategory: filters.subCategory,
category: filters.category,
category: filters.category ? filters.category : router.query.category,
activityType: filters.activityType,
fromDate: filters.fromDate,
toDate: filters.toDate,
......
......@@ -185,7 +185,9 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta
filters: categoryFilterArray,
filterMode: "tree",
filterSearch: true,
onFilter: (value, record) => record.category.startsWith(value),
onFilter: (value, record) => {
console.log(value);
},
width: "15%"
},
{
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!