stay_commerce-frontend 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +8 -0
- data/app/assets/builds/404error-RVKQJ4S4.digested.jpg +0 -0
- data/app/assets/builds/Facebook-5HJUILVR.digested.svg +3 -0
- data/app/assets/builds/Google-CZ3UPVSC.digested.svg +6 -0
- data/app/assets/builds/application.js +95 -0
- data/app/assets/builds/application.js.map +7 -0
- data/app/assets/builds/beach-KAZW5GM3.digested.jpg +0 -0
- data/app/assets/builds/beach2-3ARC34NS.digested.jpg +0 -0
- data/app/assets/builds/beach3-PSTOH5FV.digested.jpg +0 -0
- data/app/assets/builds/beach4-PWNRPD3S.digested.jpg +0 -0
- data/app/assets/builds/beach5-SBOKKRHF.digested.jpg +0 -0
- data/app/assets/builds/beach6-SXZ5Y5AI.digested.jpg +0 -0
- data/app/assets/builds/beach7-FNBMFVKK.digested.jpg +0 -0
- data/app/assets/builds/beach8-TD7LTRQM.digested.jpg +0 -0
- data/app/assets/builds/bg-image-H7UGUMV2.digested.jpg +0 -0
- data/app/assets/builds/bgimage-DU3PCXKN.digested.jpg +0 -0
- data/app/assets/builds/bundle.css +30914 -0
- data/app/assets/builds/bundle.css.map +7 -0
- data/app/assets/builds/bundle.js +74569 -0
- data/app/assets/builds/bundle.js.map +7 -0
- data/app/assets/builds/hotel1-HGBXPKJK.digested.jpg +0 -0
- data/app/assets/builds/logo_updated-KQWAXLYL.digested.png +0 -0
- data/app/assets/builds/styles.css +6422 -0
- data/app/assets/builds/styles.css.map +7 -0
- data/app/assets/config/manifest.js +2 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/stay_commerce/frontend/beach-666122_1280 (1).jpg +0 -0
- data/app/assets/images/stay_commerce/frontend/beach-666122_1280.jpg +0 -0
- data/app/assets/stylesheets/stay_commerce/frontend/application.css +15 -0
- data/app/controllers/stay_commerce/frontend/application_controller.rb +8 -0
- data/app/controllers/stay_commerce/frontend/welcome_controller.rb +6 -0
- data/app/helpers/stay_commerce/frontend/application_helper.rb +6 -0
- data/app/javascript/Images/404error.jpg +0 -0
- data/app/javascript/Images/Facebook.svg +3 -0
- data/app/javascript/Images/Google.svg +6 -0
- data/app/javascript/Images/beach-2245867_1280.jpg +0 -0
- data/app/javascript/Images/beach.jpg +0 -0
- data/app/javascript/Images/beach2.jpg +0 -0
- data/app/javascript/Images/beach3.jpg +0 -0
- data/app/javascript/Images/beach4.jpg +0 -0
- data/app/javascript/Images/beach5.jpg +0 -0
- data/app/javascript/Images/beach6.jpg +0 -0
- data/app/javascript/Images/beach7.jpg +0 -0
- data/app/javascript/Images/beach8.jpg +0 -0
- data/app/javascript/Images/bg-image.jpg +0 -0
- data/app/javascript/Images/bgimage.jpg +0 -0
- data/app/javascript/Images/blog-1.jpg +0 -0
- data/app/javascript/Images/gallery.png +0 -0
- data/app/javascript/Images/home 5.jpg +0 -0
- data/app/javascript/Images/home1.jpg +0 -0
- data/app/javascript/Images/home2.jpg +0 -0
- data/app/javascript/Images/home3.jpg +0 -0
- data/app/javascript/Images/home6.jpg +0 -0
- data/app/javascript/Images/hotel1.jpg +0 -0
- data/app/javascript/Images/room1.jpg +0 -0
- data/app/javascript/Images/room2.jpg +0 -0
- data/app/javascript/Images/room3.jpg +0 -0
- data/app/javascript/Images/room4.jpg +0 -0
- data/app/javascript/Images/wine-4520213_1280.jpg +0 -0
- data/app/javascript/application.js +1 -0
- data/app/javascript/react/Api/apiConstants.js +47 -0
- data/app/javascript/react/assets/beach-2245867_1280.jpg +0 -0
- data/app/javascript/react/assets/logo.png +0 -0
- data/app/javascript/react/assets/logo_updated.png +0 -0
- data/app/javascript/react/components/AboutUsPage/AboutPage.jsx +41 -0
- data/app/javascript/react/components/AboutusFront/About.jsx +37 -0
- data/app/javascript/react/components/Accommodation/Accommodation.jsx +32 -0
- data/app/javascript/react/components/Accommodation/NormalListing.jsx +50 -0
- data/app/javascript/react/components/Accommodation/SpecialListing.jsx +51 -0
- data/app/javascript/react/components/Accountpage/AccountInfo.jsx +217 -0
- data/app/javascript/react/components/Accountpage/AccountPage.jsx +27 -0
- data/app/javascript/react/components/Accountpage/CommonPage.jsx +24 -0
- data/app/javascript/react/components/AddNewProperty/CommonLayout.jsx +68 -0
- data/app/javascript/react/components/AddNewProperty/Description.jsx +229 -0
- data/app/javascript/react/components/AddNewProperty/Details.jsx +234 -0
- data/app/javascript/react/components/AddNewProperty/Images.jsx +196 -0
- data/app/javascript/react/components/AddNewProperty/Location.jsx +239 -0
- data/app/javascript/react/components/AddNewProperty/Room.jsx +1132 -0
- data/app/javascript/react/components/AvatarDropdown/AvatarDropDown.jsx +142 -0
- data/app/javascript/react/components/BlogDesign/BlogsLatest.jsx +67 -0
- data/app/javascript/react/components/ContactUs/Contact.jsx +89 -0
- data/app/javascript/react/components/FacilitiesSection/Facilities.jsx +66 -0
- data/app/javascript/react/components/FixedNavbar/FixedNav.jsx +88 -0
- data/app/javascript/react/components/ForgetPassword/ForgetPassword.jsx +103 -0
- data/app/javascript/react/components/Gallery/Gallery.jsx +164 -0
- data/app/javascript/react/components/GalleryModalLight/GalleryModalLight.jsx +35 -0
- data/app/javascript/react/components/GallerySlider/GallerySlider.jsx +58 -0
- data/app/javascript/react/components/Headers/PropertyCard.jsx +46 -0
- data/app/javascript/react/components/HeroSectionDesign/BookingForm.jsx +178 -0
- data/app/javascript/react/components/HeroSectionDesign/HeroSection.jsx +29 -0
- data/app/javascript/react/components/HeroSectionDesign/MyPropertiesListing.jsx +104 -0
- data/app/javascript/react/components/HeroSectionDesign/PropertiesPage.jsx +122 -0
- data/app/javascript/react/components/HotelListing/Listing.jsx +48 -0
- data/app/javascript/react/components/Layout/Layout.js +18 -0
- data/app/javascript/react/components/Listing-stay-Detail/AmenitiesFeatures.jsx +58 -0
- data/app/javascript/react/components/Listing-stay-Detail/AmenitiesModal.jsx +250 -0
- data/app/javascript/react/components/Listing-stay-Detail/ApartmentCard.jsx +120 -0
- data/app/javascript/react/components/Listing-stay-Detail/BookingModal.jsx +398 -0
- data/app/javascript/react/components/Listing-stay-Detail/CheckoutForm.jsx +296 -0
- data/app/javascript/react/components/Listing-stay-Detail/ListingStayDetailPage.jsx +512 -0
- data/app/javascript/react/components/Listing-stay-Detail/PropertyDescription.jsx +76 -0
- data/app/javascript/react/components/Listing-stay-Detail/PropertyDetailsCard.jsx +62 -0
- data/app/javascript/react/components/Listing-stay-Detail/Reviews.jsx +132 -0
- data/app/javascript/react/components/Listing-stay-Detail/RoomDescriptionModal.jsx +105 -0
- data/app/javascript/react/components/Listing-stay-Detail/Rules.jsx +23 -0
- data/app/javascript/react/components/ListingImageGallery/ListingImageGallery.jsx +30 -0
- data/app/javascript/react/components/LoginPage/LoginPage.jsx +115 -0
- data/app/javascript/react/components/MobileNav/MobileMenu.jsx +47 -0
- data/app/javascript/react/components/Navbar/Navbar.jsx +25 -0
- data/app/javascript/react/components/Page404/Page404.jsx +30 -0
- data/app/javascript/react/components/PropertyListing/MyProperties.jsx +146 -0
- data/app/javascript/react/components/PropertyListing/StayBooking/BookingDetails.jsx +178 -0
- data/app/javascript/react/components/PropertyListing/StayBooking/MyBooking.jsx +83 -0
- data/app/javascript/react/components/ResetPassword/ResetPassword.jsx +117 -0
- data/app/javascript/react/components/SignupPage/SignupPage.jsx +185 -0
- data/app/javascript/react/components/SmallNavbar/SmallNav.jsx +51 -0
- data/app/javascript/react/components/SocialAuth/SocialAuth.jsx +21 -0
- data/app/javascript/react/components/StayCard/StayCard.jsx +69 -0
- data/app/javascript/react/components/StayCard/StayCard2.jsx +45 -0
- data/app/javascript/react/components/StayCard/StayCard3.jsx +45 -0
- data/app/javascript/react/components/TestimonialSection/Testimonial.jsx +113 -0
- data/app/javascript/react/components/Unauthorized/Unauthorized.jsx +12 -0
- data/app/javascript/react/data/jsons/__countryListing.json +201 -0
- data/app/javascript/react/packs/App.js +26 -0
- data/app/javascript/react/packs/index.jsx +38 -0
- data/app/javascript/react/packs/routes/ParentRoute.jsx +14 -0
- data/app/javascript/react/packs/routes/Route.jsx +163 -0
- data/app/javascript/react/pages/AccommodationList.jsx +21 -0
- data/app/javascript/react/pages/Home.jsx +32 -0
- data/app/javascript/react/redux/slices/AuthSlice/AuthSlice.jsx +100 -0
- data/app/javascript/react/redux/slices/PropertySlice/PropertySlice.jsx +722 -0
- data/app/javascript/react/redux/slices/PropertySlice/Searchslice.jsx +36 -0
- data/app/javascript/react/redux/slices/UserSlice/UserSlice.jsx +215 -0
- data/app/javascript/react/redux/store.js +35 -0
- data/app/javascript/react/shared/Avatar/Avatar.jsx +32 -0
- data/app/javascript/react/shared/Badge/Badge.jsx +33 -0
- data/app/javascript/react/shared/Button/Button.jsx +67 -0
- data/app/javascript/react/shared/Button/ButtonPrimary.jsx +11 -0
- data/app/javascript/react/shared/Button/ButtonSelect.jsx +9 -0
- data/app/javascript/react/shared/Checkbox/Checkbox.jsx +38 -0
- data/app/javascript/react/shared/CurrencySymbol.jsx +6 -0
- data/app/javascript/react/shared/DateField/CustomDatePicker.jsx +69 -0
- data/app/javascript/react/shared/FooterSection/Footer.jsx +75 -0
- data/app/javascript/react/shared/FormField/FormField.jsx +75 -0
- data/app/javascript/react/shared/FormItem/FormItem.jsx +20 -0
- data/app/javascript/react/shared/Input/Input.jsx +27 -0
- data/app/javascript/react/shared/Label/Label.jsx +12 -0
- data/app/javascript/react/shared/Modal.jsx +20 -0
- data/app/javascript/react/shared/NcImage/NcImage.jsx +101 -0
- data/app/javascript/react/shared/NcImage/PlaceIcon.jsx +31 -0
- data/app/javascript/react/shared/NcImage/placecImageIcon.svg +6 -0
- data/app/javascript/react/shared/Select/Select.jsx +20 -0
- data/app/javascript/react/styles/404error.scss +58 -0
- data/app/javascript/react/styles/ApartmentCard.scss +126 -0
- data/app/javascript/react/styles/BookingDetails.scss +457 -0
- data/app/javascript/react/styles/Modal.scss +36 -0
- data/app/javascript/react/styles/PropertiesPage.scss +219 -0
- data/app/javascript/react/styles/RenderSection.scss +480 -0
- data/app/javascript/react/styles/about.scss +97 -0
- data/app/javascript/react/styles/accountinfo.scss +67 -0
- data/app/javascript/react/styles/accountpage.scss +36 -0
- data/app/javascript/react/styles/amenitiesfeatures.scss +223 -0
- data/app/javascript/react/styles/application.scss +87 -0
- data/app/javascript/react/styles/avatar.scss +39 -0
- data/app/javascript/react/styles/avatardropdown.scss +57 -0
- data/app/javascript/react/styles/badge.scss +90 -0
- data/app/javascript/react/styles/blog.scss +100 -0
- data/app/javascript/react/styles/bookingform.scss +124 -0
- data/app/javascript/react/styles/button.scss +44 -0
- data/app/javascript/react/styles/buttonprimary.scss +32 -0
- data/app/javascript/react/styles/checkbox.scss +37 -0
- data/app/javascript/react/styles/commonlayout.scss +83 -0
- data/app/javascript/react/styles/commonpage.scss +51 -0
- data/app/javascript/react/styles/contact.scss +173 -0
- data/app/javascript/react/styles/customdatepicker.scss +120 -0
- data/app/javascript/react/styles/description.scss +21 -0
- data/app/javascript/react/styles/details.scss +88 -0
- data/app/javascript/react/styles/facilities.scss +131 -0
- data/app/javascript/react/styles/fixednavbar.scss +137 -0
- data/app/javascript/react/styles/fonts.scss +22 -0
- data/app/javascript/react/styles/footer.scss +300 -0
- data/app/javascript/react/styles/forgetpassword.scss +68 -0
- data/app/javascript/react/styles/formfield.scss +39 -0
- data/app/javascript/react/styles/formitem.scss +20 -0
- data/app/javascript/react/styles/gallery.scss +142 -0
- data/app/javascript/react/styles/gallerymodallight.scss +137 -0
- data/app/javascript/react/styles/galleryslider.scss +114 -0
- data/app/javascript/react/styles/header.scss +49 -0
- data/app/javascript/react/styles/herosection.scss +61 -0
- data/app/javascript/react/styles/images.scss +112 -0
- data/app/javascript/react/styles/input.scss +58 -0
- data/app/javascript/react/styles/label.scss +11 -0
- data/app/javascript/react/styles/listing.scss +94 -0
- data/app/javascript/react/styles/listingimagegallery.scss +57 -0
- data/app/javascript/react/styles/listingstaydetailpage.scss +887 -0
- data/app/javascript/react/styles/location.scss +66 -0
- data/app/javascript/react/styles/loginpage.scss +150 -0
- data/app/javascript/react/styles/mobilemenu.scss +53 -0
- data/app/javascript/react/styles/mybooking.scss +104 -0
- data/app/javascript/react/styles/myproperty.scss +51 -0
- data/app/javascript/react/styles/ncimage.scss +24 -0
- data/app/javascript/react/styles/normallisting.scss +95 -0
- data/app/javascript/react/styles/property-description.scss +75 -0
- data/app/javascript/react/styles/propertycard.scss +48 -0
- data/app/javascript/react/styles/propertydetailscard.scss +302 -0
- data/app/javascript/react/styles/resetpassword.scss +79 -0
- data/app/javascript/react/styles/reviews.scss +185 -0
- data/app/javascript/react/styles/room.scss +275 -0
- data/app/javascript/react/styles/rooms.scss +0 -0
- data/app/javascript/react/styles/select.scss +44 -0
- data/app/javascript/react/styles/signuppage.scss +132 -0
- data/app/javascript/react/styles/smallnav.scss +94 -0
- data/app/javascript/react/styles/socialauth.scss +62 -0
- data/app/javascript/react/styles/speciallisting.scss +94 -0
- data/app/javascript/react/styles/staycard.scss +77 -0
- data/app/javascript/react/styles/staycard2.scss +115 -0
- data/app/javascript/react/styles/testimonial.scss +216 -0
- data/app/javascript/react/styles/unauthorized.scss +22 -0
- data/app/javascript/react/styles/variables.scss +3 -0
- data/app/javascript/react/styles/wrapper.scss +4 -0
- data/app/javascript/react/utils/formSchema.js +120 -0
- data/app/javascript/react/utils/helpers/APIHelper.jsx +55 -0
- data/app/javascript/react/utils/helpers/ErrorHandler.js +21 -0
- data/app/javascript/react/utils/helpers/InfoHandler.js +15 -0
- data/app/javascript/react/utils/helpers/SuccessHandler.js +12 -0
- data/app/javascript/react/utils/helpers/isInViewPortIntersectionObserver.jsx +39 -0
- data/app/jobs/stay_commerce/frontend/application_job.rb +6 -0
- data/app/mailers/stay_commerce/frontend/application_mailer.rb +8 -0
- data/app/models/stay_commerce/frontend/application_record.rb +7 -0
- data/app/views/layouts/stay_commerce/frontend/application.html.erb +61 -0
- data/app/views/stay_commerce/frontend/welcome/index.html.erb +2 -0
- data/config/initializers/cors.rb +6 -0
- data/config/initializers/devise.rb +359 -0
- data/config/routes.rb +11 -0
- data/lib/stay_commerce/frontend/engine.rb +14 -0
- data/lib/stay_commerce/frontend/version.rb +5 -0
- data/lib/stay_commerce/frontend.rb +8 -0
- data/lib/tasks/stay_commerce/frontend_tasks.rake +4 -0
- metadata +370 -0
@@ -0,0 +1,142 @@
|
|
1
|
+
import React, { useState, useRef, useEffect, Fragment } from "react";
|
2
|
+
import { Popover, Transition } from "@headlessui/react";
|
3
|
+
import { useDispatch, useSelector } from "react-redux";
|
4
|
+
import { useNavigate } from "react-router-dom";
|
5
|
+
import {
|
6
|
+
UserCircleIcon,
|
7
|
+
PhoneIcon,
|
8
|
+
LifebuoyIcon,
|
9
|
+
ArrowRightOnRectangleIcon,
|
10
|
+
BookOpenIcon,
|
11
|
+
CircleStackIcon,
|
12
|
+
HomeIcon,
|
13
|
+
} from "@heroicons/react/24/outline";
|
14
|
+
import { Link } from "react-router-dom";
|
15
|
+
import Avatar from "../../shared/Avatar/Avatar";
|
16
|
+
import "../../styles/avatardropdown.scss";
|
17
|
+
import { logout } from "../../redux/slices/AuthSlice/AuthSlice";
|
18
|
+
|
19
|
+
export default function AvatarDropdown() {
|
20
|
+
const [isOpen, setIsOpen] = useState(false);
|
21
|
+
const dropdownRef = useRef(null);
|
22
|
+
const dispatch = useDispatch();
|
23
|
+
const navigate = useNavigate();
|
24
|
+
const user = useSelector((state) => state.user.data);
|
25
|
+
|
26
|
+
useEffect(() => {
|
27
|
+
const handleClickOutside = (event) => {
|
28
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
29
|
+
setIsOpen(false);
|
30
|
+
}
|
31
|
+
};
|
32
|
+
|
33
|
+
const options = [
|
34
|
+
{ name: "Account", href: "/account", icon: UserCircleIcon },
|
35
|
+
{ name: "MyBookings", href: "/mybookings", icon: BookOpenIcon },
|
36
|
+
{ name: "Contact", href: "/contact", icon: PhoneIcon },
|
37
|
+
];
|
38
|
+
if (user?.is_host || user?.is_user) {
|
39
|
+
options.push(
|
40
|
+
{ name: "My Properties", href: "/myproperties", icon: HomeIcon },
|
41
|
+
{
|
42
|
+
name: "List New Property",
|
43
|
+
href: "/property-1",
|
44
|
+
icon: CircleStackIcon,
|
45
|
+
}
|
46
|
+
);
|
47
|
+
}
|
48
|
+
|
49
|
+
const optionsFoot = [
|
50
|
+
{ name: "Help", href: "/help", icon: LifebuoyIcon },
|
51
|
+
{
|
52
|
+
name: "Logout",
|
53
|
+
href: "#",
|
54
|
+
icon: ArrowRightOnRectangleIcon,
|
55
|
+
action: "logout",
|
56
|
+
},
|
57
|
+
];
|
58
|
+
|
59
|
+
document.addEventListener("mousedown", handleClickOutside);
|
60
|
+
return () => {
|
61
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
62
|
+
};
|
63
|
+
}, []);
|
64
|
+
|
65
|
+
const handleLogout = () => {
|
66
|
+
dispatch(logout());
|
67
|
+
navigate("/login");
|
68
|
+
};
|
69
|
+
|
70
|
+
const options = [
|
71
|
+
{ name: "Account", href: "/account", icon: UserCircleIcon },
|
72
|
+
{ name: "MyBookings", href: "/mybookings", icon: BookOpenIcon },
|
73
|
+
{ name: "Contact", href: "/contact", icon: PhoneIcon },
|
74
|
+
];
|
75
|
+
|
76
|
+
if (user?.is_host) {
|
77
|
+
options.push({
|
78
|
+
name: "My Properties",
|
79
|
+
href: "/myproperties",
|
80
|
+
icon: HomeIcon,
|
81
|
+
});
|
82
|
+
}
|
83
|
+
if (user?.is_host) {
|
84
|
+
options.push({
|
85
|
+
name: "List New Property",
|
86
|
+
href: "/property-1",
|
87
|
+
icon: CircleStackIcon,
|
88
|
+
});
|
89
|
+
}
|
90
|
+
const optionsFoot = [
|
91
|
+
{ name: "Help", href: "/help", icon: LifebuoyIcon },
|
92
|
+
{
|
93
|
+
name: "Logout",
|
94
|
+
href: "#",
|
95
|
+
icon: ArrowRightOnRectangleIcon,
|
96
|
+
action: "logout",
|
97
|
+
},
|
98
|
+
];
|
99
|
+
|
100
|
+
return (
|
101
|
+
<div className="avatar-dropdown" ref={dropdownRef}>
|
102
|
+
<button onClick={() => setIsOpen(!isOpen)} className="avatar-button">
|
103
|
+
<Avatar />
|
104
|
+
</button>
|
105
|
+
|
106
|
+
{isOpen && (
|
107
|
+
<div className="dropdown-menu">
|
108
|
+
<div className="dropdown-content">
|
109
|
+
{options.map((item, index) => (
|
110
|
+
<Link
|
111
|
+
key={index}
|
112
|
+
to={item.href}
|
113
|
+
onClick={() => setIsOpen(false)}
|
114
|
+
className="dropdown-item"
|
115
|
+
>
|
116
|
+
<item.icon className="icon" />
|
117
|
+
<span>{item.name}</span>
|
118
|
+
</Link>
|
119
|
+
))}
|
120
|
+
|
121
|
+
<hr className="dropdown-divider" />
|
122
|
+
|
123
|
+
{optionsFoot.map((item, index) => (
|
124
|
+
<Link
|
125
|
+
key={index}
|
126
|
+
to={item.action === "logout" ? "#" : item.href}
|
127
|
+
onClick={() => {
|
128
|
+
if (item.action === "logout") handleLogout();
|
129
|
+
setIsOpen(false);
|
130
|
+
}}
|
131
|
+
className="dropdown-item"
|
132
|
+
>
|
133
|
+
<item.icon className="icon" />
|
134
|
+
<span>{item.name}</span>
|
135
|
+
</Link>
|
136
|
+
))}
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
)}
|
140
|
+
</div>
|
141
|
+
);
|
142
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
|
2
|
+
import React from "react";
|
3
|
+
import "../../styles/blog.scss";
|
4
|
+
import Bg1 from "../../../Images/beach4.jpg";
|
5
|
+
import Bg2 from "../../../Images/beach5.jpg";
|
6
|
+
import Bg3 from "../../../Images/beach7.jpg";
|
7
|
+
import "../../styles/wrapper.scss";
|
8
|
+
|
9
|
+
const blogPosts = [
|
10
|
+
{
|
11
|
+
image: Bg1,
|
12
|
+
tags: ["Travel", "Life Style"],
|
13
|
+
title: "Low Cost Advertising",
|
14
|
+
description: "Acres of Diamonds... you've read the famous story, or at least had it related to you. A farmer.",
|
15
|
+
date: "31st January, 2018"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
image: Bg2,
|
19
|
+
tags: ["Travel", "Life Style"],
|
20
|
+
title: "Creative Outdoor Ads",
|
21
|
+
description: "Self-doubt and fear interfere with our ability to achieve or set goals.",
|
22
|
+
date: "31st January, 2018"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
image: Bg3,
|
26
|
+
tags: ["Travel", "Life Style"],
|
27
|
+
title: "It Is Classified How To Utilize Free",
|
28
|
+
description: "Why do you want to motivate yourself? Actually, just answering that question fully can.",
|
29
|
+
date: "31st January, 2018"
|
30
|
+
}
|
31
|
+
];
|
32
|
+
|
33
|
+
const BlogSection = () => {
|
34
|
+
return (
|
35
|
+
<section className="blog-section">
|
36
|
+
<div className="wrapper">
|
37
|
+
<div className="blog-cont">
|
38
|
+
<h2 className="title">Latest posts from blog</h2>
|
39
|
+
<p className="subtitle">
|
40
|
+
The French Revolution constituted for the conscience of the dominant aristocratic class a fall from
|
41
|
+
</p>
|
42
|
+
<div className="posts">
|
43
|
+
{blogPosts.map((post, index) => (
|
44
|
+
<div className="post-card" key={index}>
|
45
|
+
<div className="img-wrapper">
|
46
|
+
<img src={post.image} alt={post.title} className="post-image" />
|
47
|
+
</div>
|
48
|
+
<div className="post-content">
|
49
|
+
<div className="tags">
|
50
|
+
{post.tags.map((tag, i) => (
|
51
|
+
<span className="tag" key={i}>{tag}</span>
|
52
|
+
))}
|
53
|
+
</div>
|
54
|
+
<h3 className="post-title">{post.title}</h3>
|
55
|
+
<p className="post-description">{post.description}</p>
|
56
|
+
<p className="post-date">{post.date}</p>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
))}
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
</section>
|
64
|
+
);
|
65
|
+
};
|
66
|
+
|
67
|
+
export default BlogSection;
|
@@ -0,0 +1,89 @@
|
|
1
|
+
|
2
|
+
import React from "react";
|
3
|
+
import Navbar from "../Navbar/Navbar";
|
4
|
+
import Bg from "../../../Images/bgimage.jpg";
|
5
|
+
import { Link } from "react-router-dom";
|
6
|
+
import "../../styles/contact.scss";
|
7
|
+
import "../../styles/wrapper.scss";
|
8
|
+
|
9
|
+
const Contact = () => {
|
10
|
+
return (
|
11
|
+
<>
|
12
|
+
<div
|
13
|
+
className="contact-hero"
|
14
|
+
style={{ backgroundImage: `url(${Bg})` }}
|
15
|
+
>
|
16
|
+
<h1>Contact</h1>
|
17
|
+
<div className="breadcrumb">
|
18
|
+
<Link to="/" className="breadcrumb-link">
|
19
|
+
Home
|
20
|
+
</Link>
|
21
|
+
<span className="breadcrumb-separator">→</span>
|
22
|
+
<span className="breadcrumb-current">Contact</span>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div className="contact-container">
|
27
|
+
<div className="wrapper">
|
28
|
+
<div className="contact-map">
|
29
|
+
<iframe
|
30
|
+
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d52871.863694855426!2d-118.50302023809138!3d34.02324754471949!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80c2a4cec2910019%3A0xb4170ab5ff23f5ab!2sSanta%20Monica%2C%20CA!5e0!3m2!1sen!2sus!4v1613672854245!5m2!1sen!2sus"
|
31
|
+
width="100%"
|
32
|
+
height="100%"
|
33
|
+
style={{ border: 0 }}
|
34
|
+
allowFullScreen=""
|
35
|
+
loading="lazy"
|
36
|
+
referrerPolicy="no-referrer-when-downgrade"
|
37
|
+
></iframe>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div className="contact-content">
|
41
|
+
<div className="contact-info">
|
42
|
+
<div className="info-item">
|
43
|
+
<span className="icon">🏠</span>
|
44
|
+
<div>
|
45
|
+
<h4>California, United States</h4>
|
46
|
+
<p>Santa monica boulevard</p>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div className="info-item">
|
51
|
+
<span className="icon">📞</span>
|
52
|
+
<div>
|
53
|
+
<h4>00 (440) 9865 562</h4>
|
54
|
+
<p>Mon to Fri 9am to 6 pm</p>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div className="info-item">
|
59
|
+
<span className="icon">✉️</span>
|
60
|
+
<div>
|
61
|
+
<h4>support@colorlib.com</h4>
|
62
|
+
<p>Send us your query anytime!</p>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<form className="contact-form">
|
68
|
+
<div className="form-left">
|
69
|
+
<input type="text" placeholder="Enter your name" />
|
70
|
+
<input type="email" placeholder="Enter email address" />
|
71
|
+
<input type="text" placeholder="Enter Subject" />
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<div className="form-right">
|
75
|
+
<textarea placeholder="Enter Message"></textarea>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
<div className="form-button">
|
79
|
+
<button type="submit">SEND MESSAGE</button>
|
80
|
+
</div>
|
81
|
+
</form>
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
</div>
|
85
|
+
</>
|
86
|
+
);
|
87
|
+
};
|
88
|
+
|
89
|
+
export default Contact;
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import React from "react";
|
2
|
+
|
3
|
+
const features = [
|
4
|
+
{
|
5
|
+
icon: "🍽️",
|
6
|
+
title: "Restaurant",
|
7
|
+
description:
|
8
|
+
"Experience fine dining with our world-class restaurant offering exquisite cuisine.",
|
9
|
+
},
|
10
|
+
{
|
11
|
+
icon: "🚴",
|
12
|
+
title: "Sports Club",
|
13
|
+
description:
|
14
|
+
"Stay active with our premium sports facilities and professional equipment.",
|
15
|
+
},
|
16
|
+
{
|
17
|
+
icon: "👕",
|
18
|
+
title: "Swimming Pool",
|
19
|
+
description:
|
20
|
+
"Relax and unwind in our luxurious swimming pool with crystal clear water.",
|
21
|
+
},
|
22
|
+
{
|
23
|
+
icon: "🚗",
|
24
|
+
title: "Rent a Car",
|
25
|
+
description:
|
26
|
+
"Convenient car rental services for your transportation needs.",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
icon: "🏋️",
|
30
|
+
title: "Gymnasium",
|
31
|
+
description:
|
32
|
+
"Modern fitness center with state-of-the-art equipment and training facilities.",
|
33
|
+
},
|
34
|
+
{
|
35
|
+
icon: "🍹",
|
36
|
+
title: "Bar",
|
37
|
+
description:
|
38
|
+
"Enjoy premium beverages and cocktails in our elegant bar lounge.",
|
39
|
+
},
|
40
|
+
];
|
41
|
+
|
42
|
+
const FacilitiesSection = () => {
|
43
|
+
return (
|
44
|
+
<div className="modern-facilities-section">
|
45
|
+
<div className="facilities-container">
|
46
|
+
<h2 className="facilities-main-title">Royal Facilities</h2>
|
47
|
+
|
48
|
+
<div className="facilities-grid">
|
49
|
+
{features.map((feature, index) => (
|
50
|
+
<div key={index} className="facility-card">
|
51
|
+
<div className="icon-container">
|
52
|
+
<span className="facility-icon">{feature.icon}</span>
|
53
|
+
</div>
|
54
|
+
<div className="facility-content">
|
55
|
+
<h3 className="facility-title">{feature.title}</h3>
|
56
|
+
<p className="facility-description">{feature.description}</p>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
))}
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
);
|
64
|
+
};
|
65
|
+
|
66
|
+
export default FacilitiesSection;
|
@@ -0,0 +1,88 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { Link, useLocation, useNavigate } from "react-router-dom";
|
3
|
+
import { useSelector, useDispatch } from "react-redux";
|
4
|
+
import { logout } from "../../redux/slices/AuthSlice/AuthSlice";
|
5
|
+
import MobileMenu from "../MobileNav/MobileMenu";
|
6
|
+
import "../../styles/fixednavbar.scss";
|
7
|
+
import AvatarDropDown from "../AvatarDropdown/AvatarDropDown";
|
8
|
+
import logo from "../../assets/logo_updated.png";
|
9
|
+
|
10
|
+
// React Icons
|
11
|
+
import { IoHomeOutline } from "react-icons/io5";
|
12
|
+
import { MdInfoOutline } from "react-icons/md";
|
13
|
+
import { FaBed, FaImages, FaBlogger } from "react-icons/fa";
|
14
|
+
|
15
|
+
function FixedNavbar() {
|
16
|
+
const location = useLocation();
|
17
|
+
const navigate = useNavigate();
|
18
|
+
const dispatch = useDispatch();
|
19
|
+
const { user } = useSelector((state) => state.auth);
|
20
|
+
|
21
|
+
const handleLogout = () => {
|
22
|
+
dispatch(logout());
|
23
|
+
navigate("/");
|
24
|
+
};
|
25
|
+
|
26
|
+
const navItems = [
|
27
|
+
{ name: "Home", path: "/", icon: <IoHomeOutline /> },
|
28
|
+
{ name: "About us", path: "/about-us", icon: <MdInfoOutline /> },
|
29
|
+
{ name: "Accommodation", path: "/accommodation", icon: <FaBed /> },
|
30
|
+
{ name: "Gallery", path: "/gallery", icon: <FaImages /> },
|
31
|
+
// { name: "Blog", path: "/blog", icon: <FaBlogger /> },
|
32
|
+
];
|
33
|
+
|
34
|
+
return (
|
35
|
+
<nav className="navbar">
|
36
|
+
<div className="container">
|
37
|
+
<div className="navContent">
|
38
|
+
<div className="logo">
|
39
|
+
<span className="logospan">
|
40
|
+
<a href="/">
|
41
|
+
<img src={logo} width={140} alt="Logo" />
|
42
|
+
</a>
|
43
|
+
</span>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div className="navMenu desktopMenu">
|
47
|
+
{navItems.map((item) => (
|
48
|
+
<Link
|
49
|
+
key={item.name}
|
50
|
+
to={item.path}
|
51
|
+
className={`navLink ${
|
52
|
+
location.pathname === item.path ? "active" : ""
|
53
|
+
}`}
|
54
|
+
>
|
55
|
+
<span className="icon">{item.icon}</span>
|
56
|
+
<span className="text">{item.name}</span>
|
57
|
+
</Link>
|
58
|
+
))}
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<div className="authButtons">
|
62
|
+
{user ? (
|
63
|
+
<>
|
64
|
+
<button onClick={handleLogout} className="logoutButton">
|
65
|
+
LOGOUT
|
66
|
+
</button>
|
67
|
+
<AvatarDropDown />
|
68
|
+
</>
|
69
|
+
) : (
|
70
|
+
<>
|
71
|
+
<Link to="/login" className="loginButton">
|
72
|
+
LOGIN
|
73
|
+
</Link>
|
74
|
+
<Link to="/signup" className="signupButton">
|
75
|
+
SIGNUP
|
76
|
+
</Link>
|
77
|
+
</>
|
78
|
+
)}
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<MobileMenu />
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
</nav>
|
85
|
+
);
|
86
|
+
}
|
87
|
+
|
88
|
+
export default FixedNavbar;
|
@@ -0,0 +1,103 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { Formik, Form, Field, ErrorMessage } from "formik";
|
3
|
+
import * as Yup from "yup";
|
4
|
+
import { useDispatch } from "react-redux";
|
5
|
+
import { useNavigate } from "react-router-dom";
|
6
|
+
import { forgetPassword } from "../../redux/slices/UserSlice/UserSlice";
|
7
|
+
import { toast } from "react-toastify";
|
8
|
+
import ButtonPrimary from "../../shared/Button/ButtonPrimary";
|
9
|
+
import "../../styles/forgetpassword.scss";
|
10
|
+
import { emailValidationSchema } from "../../utils/formSchema";
|
11
|
+
|
12
|
+
const ForgetPassword = () => {
|
13
|
+
const dispatch = useDispatch();
|
14
|
+
const navigate = useNavigate();
|
15
|
+
|
16
|
+
return (
|
17
|
+
<div className="request-password-reset">
|
18
|
+
<div className="request-password-reset__container">
|
19
|
+
<h2 className="request-password-reset__title">Forgot Password</h2>
|
20
|
+
<p className="request-password-reset__subtitle">
|
21
|
+
Enter your email below and we'll send you a link to reset your
|
22
|
+
password.
|
23
|
+
</p>
|
24
|
+
|
25
|
+
<Formik
|
26
|
+
initialValues={{ email: "" }}
|
27
|
+
validationSchema={emailValidationSchema}
|
28
|
+
onSubmit={async (values, { setSubmitting }) => {
|
29
|
+
setSubmitting(true);
|
30
|
+
try {
|
31
|
+
dispatch(forgetPassword({ user: { email: values.email } }))
|
32
|
+
.unwrap()
|
33
|
+
.then((res) => {
|
34
|
+
if (res?.success) {
|
35
|
+
toast.success("Reset link sent to your email!");
|
36
|
+
navigate("/reset-password");
|
37
|
+
} else {
|
38
|
+
if (res?.error && res.error.includes("Email not found")) {
|
39
|
+
toast.error(
|
40
|
+
"Email not found. Please enter a valid email."
|
41
|
+
);
|
42
|
+
} else {
|
43
|
+
toast.error(
|
44
|
+
res?.message ||
|
45
|
+
"Failed to send reset link. Please try again."
|
46
|
+
);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
})
|
50
|
+
.catch((error) => {
|
51
|
+
const errorMessage =
|
52
|
+
error?.response?.data?.error ||
|
53
|
+
"Failed to send reset link.";
|
54
|
+
if (errorMessage.includes("Email not found")) {
|
55
|
+
toast.error("Email not found. Please enter a valid email.");
|
56
|
+
} else {
|
57
|
+
toast.error(errorMessage);
|
58
|
+
}
|
59
|
+
});
|
60
|
+
} finally {
|
61
|
+
setSubmitting(false);
|
62
|
+
}
|
63
|
+
}}
|
64
|
+
>
|
65
|
+
{({ isSubmitting }) => (
|
66
|
+
<Form>
|
67
|
+
<div className="request-password-reset__field">
|
68
|
+
<label
|
69
|
+
htmlFor="email"
|
70
|
+
className="request-password-reset__label"
|
71
|
+
>
|
72
|
+
Email Address
|
73
|
+
</label>
|
74
|
+
<Field
|
75
|
+
type="email"
|
76
|
+
name="email"
|
77
|
+
id="email"
|
78
|
+
placeholder="Enter your email"
|
79
|
+
className="request-password-reset__input"
|
80
|
+
/>
|
81
|
+
<ErrorMessage
|
82
|
+
name="email"
|
83
|
+
component="div"
|
84
|
+
className="request-password-reset__error"
|
85
|
+
/>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<ButtonPrimary
|
89
|
+
type="submit"
|
90
|
+
className="request-password-reset__button"
|
91
|
+
disabled={isSubmitting}
|
92
|
+
>
|
93
|
+
{isSubmitting ? "Sending..." : "Send Reset Link"}
|
94
|
+
</ButtonPrimary>
|
95
|
+
</Form>
|
96
|
+
)}
|
97
|
+
</Formik>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
);
|
101
|
+
};
|
102
|
+
|
103
|
+
export default ForgetPassword;
|