Commit 90695a54 by jaymehta

.

1 parent 1eec64c6
...@@ -179,7 +179,6 @@ const Reviews = ({ isVendor }) => { ...@@ -179,7 +179,6 @@ const Reviews = ({ isVendor }) => {
}; };
}) })
); );
// dispatch(getActivitiesByFilters({}));
}, [reviews]); }, [reviews]);
return ( return (
......
...@@ -89,7 +89,6 @@ const ReviewsListing = ({ activityId, setshowReviews, isVendor }) => { ...@@ -89,7 +89,6 @@ const ReviewsListing = ({ activityId, setshowReviews, isVendor }) => {
onClick={async () => { onClick={async () => {
const res = await deleteReview({ reviewId }); const res = await deleteReview({ reviewId });
dispatch(getReviewsAction({ activityId })); dispatch(getReviewsAction({ activityId }));
// dispatch(getActivitiesByFilters({}));
toast.success("Review deleted"); toast.success("Review deleted");
setshowModal(false); setshowModal(false);
// console.log(res); // console.log(res);
......
...@@ -24,7 +24,7 @@ const SearchBar = () => { ...@@ -24,7 +24,7 @@ const SearchBar = () => {
<Typeahead <Typeahead
open={open} open={open}
id="select" id="select"
placeholder="Search for products, brands or categories" placeholder="Search for experiences or categories"
onBlur={() => { onBlur={() => {
setopen(false); setopen(false);
}} }}
......
...@@ -11,11 +11,12 @@ import { getWishlists } from "../../redux/actions/activityAction"; ...@@ -11,11 +11,12 @@ import { getWishlists } from "../../redux/actions/activityAction";
import { Typeahead } from "react-bootstrap-typeahead"; import { Typeahead } from "react-bootstrap-typeahead";
import axios from "axios"; import axios from "axios";
import ActiveLink from "../common/ActiveLink"; import ActiveLink from "../common/ActiveLink";
import { Skeleton } from "antd";
const Header = () => { const Header = () => {
const [isGridViewOpen, setIsGridViewOpen] = useState(false); const [isGridViewOpen, setIsGridViewOpen] = useState(false);
const { loadedUser } = useSelector(state => state.loadedUser); 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 [open, setopen] = useState(false);
const [options, setoptions] = useState([]); const [options, setoptions] = useState([]);
// console.log("options", options); // console.log("options", options);
...@@ -79,7 +80,9 @@ const Header = () => { ...@@ -79,7 +80,9 @@ const Header = () => {
</div> </div>
<div className=""> <div className="">
<div className="name">John Doe</div> <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> </div>
<div className="user-item"> <div className="user-item">
...@@ -109,11 +112,13 @@ const Header = () => { ...@@ -109,11 +112,13 @@ const Header = () => {
</a> </a>
</li> </li>
<li> <li>
<a onClick={async () => { <a
onClick={async () => {
signOut({ redirect: false }); signOut({ redirect: false });
await router.push("/"); await router.push("/");
window.location.reload(); window.location.reload();
}}> }}
>
<span className="image-container"> <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/logout.svg" />
</span> </span>
...@@ -122,7 +127,6 @@ const Header = () => { ...@@ -122,7 +127,6 @@ const Header = () => {
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
{/* <Button {/* <Button
...@@ -192,7 +196,7 @@ const Header = () => { ...@@ -192,7 +196,7 @@ const Header = () => {
setopen(false); setopen(false);
}} }}
id="select" id="select"
placeholder="Search for products, brands or categories" placeholder="Search for experiences or categories"
onChange={selected => { onChange={selected => {
console.log("selected", selected); console.log("selected", selected);
// router.push("/listing"); // router.push("/listing");
...@@ -249,7 +253,8 @@ const Header = () => { ...@@ -249,7 +253,8 @@ const Header = () => {
</Button> </Button>
</div> </div>
</Form> </Form>
{/* {console.log(user.id)} */} {!loading ? (
<>
{loadedUser && loadedUser.id ? ( {loadedUser && loadedUser.id ? (
<div className="top-btn hide-on-mobile"> <div className="top-btn hide-on-mobile">
<div className="logout-bk"> <div className="logout-bk">
...@@ -271,7 +276,9 @@ const Header = () => { ...@@ -271,7 +276,9 @@ const Header = () => {
</div> </div>
<div className=""> <div className="">
<div className="name">John Doe</div> <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> </div>
<div className="user-item"> <div className="user-item">
...@@ -301,11 +308,13 @@ const Header = () => { ...@@ -301,11 +308,13 @@ const Header = () => {
</a> </a>
</li> </li>
<li> <li>
<a onClick={async () => { <a
onClick={async () => {
signOut({ redirect: false }); signOut({ redirect: false });
await router.push("/"); await router.push("/");
window.location.reload(); window.location.reload();
}}> }}
>
<span className="image-container"> <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/logout.svg" />
</span> </span>
...@@ -314,7 +323,6 @@ const Header = () => { ...@@ -314,7 +323,6 @@ const Header = () => {
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
{/* <Button {/* <Button
...@@ -330,7 +338,7 @@ const Header = () => { ...@@ -330,7 +338,7 @@ const Header = () => {
</Button> */} </Button> */}
</div> </div>
) : ( ) : (
<div className="top-btn hide-on-mobiles asdasd"> <div className="top-btn hide-on-mobiles">
<Button <Button
onClick={() => { onClick={() => {
router.push("/signup/user"); router.push("/signup/user");
...@@ -351,6 +359,13 @@ const Header = () => { ...@@ -351,6 +359,13 @@ const Header = () => {
</Button> </Button>
</div> </div>
)} )}
</>
) : (
<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> </Navbar.Collapse>
</Container> </Container>
</Navbar> </Navbar>
......
...@@ -42,7 +42,6 @@ const LetDiscover = ({ categories }) => { ...@@ -42,7 +42,6 @@ const LetDiscover = ({ categories }) => {
// }, [router]); // }, [router]);
useEffect(() => { useEffect(() => {
console.log("router.query.category", router.query.category); console.log("router.query.category", router.query.category);
// console.log("getting id to filtered categoryiiiiiiiiiiifsdkhdjkskiiiiiiiiiiiiiiiiiiiiiiiii", parseInt(router.query.category))
if (router.query.category) { if (router.query.category) {
dispatch(setActivityFilters({ filters: { category: Number(router.query.category), subCategories: [] } })); dispatch(setActivityFilters({ filters: { category: Number(router.query.category), subCategories: [] } }));
......
...@@ -100,7 +100,7 @@ const ListingInner = ({ allActivitiesData, loading, totalCount }) => { ...@@ -100,7 +100,7 @@ const ListingInner = ({ allActivitiesData, loading, totalCount }) => {
dispatch( dispatch(
getActivitiesByFilters({ getActivitiesByFilters({
subCategory: filters.subCategory, subCategory: filters.subCategory,
category: filters.category, category: filters.category ? filters.category : router.query.category,
activityType: filters.activityType, activityType: filters.activityType,
fromDate: filters.fromDate, fromDate: filters.fromDate,
toDate: filters.toDate, toDate: filters.toDate,
......
...@@ -185,7 +185,9 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta ...@@ -185,7 +185,9 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta
filters: categoryFilterArray, filters: categoryFilterArray,
filterMode: "tree", filterMode: "tree",
filterSearch: true, filterSearch: true,
onFilter: (value, record) => record.category.startsWith(value), onFilter: (value, record) => {
console.log(value);
},
width: "15%" 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!