2 Commits
038db5b808
...
d1f08af7a8
Author | SHA1 | Message | Date |
---|---|---|---|
sina_sajjadi | d1f08af7a8 |
Merge branch 'main' of https://git.nwhco.ir/sina_sajjadi/AqilaFrontend
|
2 months ago |
sina_sajjadi | d191d8ebd2 |
UI bugs fixed toast added
|
2 months ago |
40 changed files with 978 additions and 543 deletions
-
21package-lock.json
-
2package.json
-
6src/app/(account-pages)/account/page.tsx
-
3src/app/(account-pages)/passengers-list/page.tsx
-
9src/app/(client-components)/(Header)/MainNav1.tsx
-
84src/app/(client-components)/(HeroSearchForm)/(stay-search-form)/StayDatesRangeInput.tsx
-
22src/app/(client-components)/(HeroSearchForm)/ButtonSubmit.tsx
-
4src/app/(client-components)/(HeroSearchForm)/GuestsInput.tsx
-
49src/app/(client-components)/(HeroSearchForm)/LocationInput.tsx
-
75src/app/(listing-detail)/(components)/MobileFooterSticky.tsx
-
11src/app/(server-components)/SectionHero.tsx
-
4src/app/about/page.tsx
-
20src/app/add-listing/[[...stepIndex]]/page.tsx
-
5src/app/add-new-passenger/page.tsx
-
42src/app/blog/[...slug]/Survey.tsx
-
40src/app/blog/[...slug]/page.tsx
-
4src/app/custom-history/page.tsx
-
35src/app/custom-trip/page.tsx
-
93src/app/faq/page.tsx
-
40src/app/faq/table.tsx
-
146src/app/forgot-password/page.tsx
-
13src/app/layout.tsx
-
103src/app/login/page.tsx
-
17src/app/page.tsx
-
2src/app/signup/methodes/page.tsx
-
6src/app/signup/otp-code/page.tsx
-
79src/app/signup/page.tsx
-
133src/app/tours/SectionGridFilterCard.tsx
-
29src/app/tours/[slug]/page.tsx
-
5src/app/tours/layout.tsx
-
25src/components/CardCategory3.tsx
-
151src/components/SectionGridFeaturePlaces.tsx
-
6src/components/SectionOurFeatures.tsx
-
2src/components/StayCard2.tsx
-
12src/components/TourSuggestion.tsx
-
10src/components/contexts/tourDetails.tsx
-
10src/data/navigation.ts
-
3src/shared/Navigation/Navigation.tsx
-
6src/shared/Navigation/NavigationItem.tsx
-
16yarn.lock
@ -1,48 +1,83 @@ |
|||
import React, { useState } from "react"; |
|||
import React, { useContext, useState } from "react"; |
|||
import ModalSelectDate from "@/components/ModalSelectDate"; |
|||
import ButtonPrimary from "@/shared/ButtonPrimary"; |
|||
import converSelectedDateToString from "@/utils/converSelectedDateToString"; |
|||
import ModalReserveMobile from "./ModalReserveMobile"; |
|||
import { useParams } from "next/navigation"; |
|||
import GuestsInput from "../listing-experiences-detail/GuestsInput"; |
|||
import ClearDataButton from "@/app/(client-components)/(HeroSearchForm)/ClearDataButton"; |
|||
import { UserPlusIcon } from "@heroicons/react/24/solid"; |
|||
import { useToursContext } from "@/components/contexts/tourDetails"; |
|||
import NcInputNumber from "@/components/NcInputNumber"; |
|||
|
|||
const MobileFooterSticky = () => { |
|||
const MobileFooterSticky = ({ data }) => { |
|||
const [startDate, setStartDate] = useState<Date | null>( |
|||
new Date("2023/02/06") |
|||
); |
|||
const [endDate, setEndDate] = useState<Date | null>(new Date("2023/02/23")); |
|||
const { setPassengers, passengers } = useToursContext(); |
|||
|
|||
const [guestAdultsInputValue, setGuestAdultsInputValue] = |
|||
useState(passengers); |
|||
|
|||
const handleChangeData = (value: number) => { |
|||
let newValue = { |
|||
guestAdults: guestAdultsInputValue, |
|||
}; |
|||
setGuestAdultsInputValue(value); |
|||
newValue.guestAdults = value; |
|||
setPassengers(value); |
|||
}; |
|||
console.log(data); |
|||
const r = /-?(\d+)$/; |
|||
|
|||
const id: string = useParams().slug.match(r)[1]; |
|||
const totalGuests = guestAdultsInputValue; |
|||
|
|||
return ( |
|||
<div className="block lg:hidden fixed bottom-0 inset-x-0 py-2 sm:py-3 bg-white dark:bg-neutral-800 border-t border-neutral-200 dark:border-neutral-6000 z-40"> |
|||
<div className="container flex items-center justify-between"> |
|||
<div className="flex gap-4"> |
|||
<div className=""> |
|||
<span className="block text-xl font-semibold"> |
|||
$311 |
|||
<span className="ml-1 text-sm font-normal text-neutral-500 dark:text-neutral-400"> |
|||
/night |
|||
</span> |
|||
</span> |
|||
<ModalSelectDate |
|||
renderChildren={({ openModal }) => ( |
|||
<span |
|||
onClick={openModal} |
|||
className="block text-sm underline font-medium" |
|||
> |
|||
{converSelectedDateToString([startDate, endDate])} |
|||
</span> |
|||
)} |
|||
<NcInputNumber |
|||
className="w-full" |
|||
defaultValue={guestAdultsInputValue} |
|||
onChange={(value) => handleChangeData(value)} |
|||
max={10} |
|||
min={1} |
|||
label="Passsengers" |
|||
desc="Ages 13 or above" |
|||
/> |
|||
</div> |
|||
</div> |
|||
<div className="flex items-center gap-2"> |
|||
<span className="block text-xl font-semibold"> |
|||
{data?.price * passengers} |
|||
</span> |
|||
|
|||
<ModalReserveMobile |
|||
renderChildren={({ openModal }) => ( |
|||
<> |
|||
<ButtonPrimary |
|||
sizeClass="px-5 sm:px-7 py-3 !rounded-2xl" |
|||
onClick={openModal} |
|||
disabled={true} |
|||
className={`${ |
|||
data?.status === "AVAILABLE" && passengers |
|||
? "" |
|||
: "opacity-60 cursor-not-allowed" |
|||
}`}
|
|||
href={`${ |
|||
data?.status === "AVAILABLE" && passengers |
|||
? `/add-listing/${id}` |
|||
: `/tours/${data?.slug}-${id}` |
|||
}`}
|
|||
> |
|||
Reserve |
|||
</ButtonPrimary> |
|||
</> |
|||
)} |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
); |
|||
}; |
|||
|
|||
|
@ -0,0 +1,42 @@ |
|||
"use client"; |
|||
|
|||
import { useState } from "react"; |
|||
import { BiDislike, BiLike } from "react-icons/bi"; |
|||
|
|||
function Survey() { |
|||
const [checked, setChecked] = useState(false); |
|||
|
|||
return ( |
|||
<div className="max-w-screen-md mx-auto flex items-center gap-6 "> |
|||
{!checked ? ( |
|||
<> |
|||
<h1 className="mb-2">Was this article helpfull ?</h1> |
|||
<div className="flex"> |
|||
<div |
|||
onClick={() => { |
|||
setChecked(true); |
|||
}} |
|||
className="cursor-pointer hover:bg-green-200 nc-Tag flex items-center gap-1 bg-white text-sm text-neutral-600 dark:text-neutral-300 py-2 rounded-lg border border-neutral-100 md:px-4 dark:bg-neutral-700 dark:border-neutral-700 hover:border-neutral-200 dark:hover:border-neutral-6000 mr-2 mb-2" |
|||
> |
|||
<p>Yes</p> |
|||
<BiLike /> |
|||
</div> |
|||
<div |
|||
onClick={() => { |
|||
setChecked(true); |
|||
}} |
|||
className="cursor-pointer hover:bg-red-300 nc-Tag flex items-center gap-1 bg-white text-sm text-neutral-600 dark:text-neutral-300 py-2 rounded-lg border border-neutral-100 md:px-4 dark:bg-neutral-700 dark:border-neutral-700 hover:border-neutral-200 dark:hover:border-neutral-6000 mr-2 mb-2" |
|||
> |
|||
<p>No</p> |
|||
<BiDislike /> |
|||
</div> |
|||
</div> |
|||
</> |
|||
) : ( |
|||
<h1>Thank you</h1> |
|||
)} |
|||
</div> |
|||
); |
|||
} |
|||
|
|||
export default Survey; |
@ -0,0 +1,93 @@ |
|||
"use client" |
|||
|
|||
import React, { useState } from "react"; |
|||
import Table from "./Table"; |
|||
|
|||
interface FAQItem { |
|||
question: string; |
|||
answer: string; |
|||
} |
|||
|
|||
const FAQ: React.FC = () => { |
|||
const [activeIndex, setActiveIndex] = useState<number | null>(null); |
|||
|
|||
const faqs: FAQItem[] = [ |
|||
{ |
|||
question: "How can I book a tour on your site?", |
|||
answer: |
|||
"To book a tour, simply select your desired destination from the 'List of Tours', choose your dates, and follow the steps to complete the booking process." |
|||
}, |
|||
{ |
|||
question: "Can I customize my tour?", |
|||
answer: |
|||
"Yes, our 'Customize Tour' feature allows you to tailor your journey based on your preferences. Click on 'Customize Tour' at the top of the page to start personalizing your experience." |
|||
}, |
|||
{ |
|||
question: "What payment methods do you accept?", |
|||
answer: |
|||
"We accept all major credit cards, PayPal, and bank transfers. You can choose your preferred method during the checkout process." |
|||
}, |
|||
{ |
|||
question: "How do I know my booking is confirmed?", |
|||
answer: |
|||
"Once you complete the payment process, you will receive a confirmation email with all the details of your booking. You can also view your booking details in your account dashboard." |
|||
}, |
|||
{ |
|||
question: "Can I cancel or modify my booking?", |
|||
answer: |
|||
"Yes, you can cancel or modify your booking from your account. Please note that cancellations must be made at least 24 hours before the tour starts to be eligible for a refund." |
|||
}, |
|||
{ |
|||
question: "Are there any hidden fees?", |
|||
answer: |
|||
"No, all fees are transparent and shown upfront before you complete your booking. We ensure there are no hidden fees." |
|||
}, |
|||
{ |
|||
question: "Do you offer group discounts?", |
|||
answer: |
|||
"Yes, we offer group discounts for larger bookings. Please contact our support team for more information on group rates." |
|||
}, |
|||
{ |
|||
question: "Is travel insurance included in the booking?", |
|||
answer: |
|||
"Yes, all our tour packages include basic travel insurance. You can choose to upgrade your insurance package during the checkout process." |
|||
}, |
|||
{ |
|||
question: "What happens if the tour is canceled by the provider?", |
|||
answer: |
|||
"If the tour is canceled by the provider due to unforeseen circumstances, you will receive a full refund or the option to reschedule your tour." |
|||
}, |
|||
{ |
|||
question: "How can I contact customer support?", |
|||
answer: |
|||
"You can contact customer support by clicking the 'Contact Us' button at the bottom of the page or by visiting our support section." |
|||
} |
|||
]; |
|||
|
|||
const toggleFAQ = (index: number) => { |
|||
if (activeIndex === index) { |
|||
setActiveIndex(null); // Close the active one
|
|||
} else { |
|||
setActiveIndex(index); // Open the clicked one
|
|||
} |
|||
}; |
|||
|
|||
return ( |
|||
<div className="container mx-auto py-12 max-w-6xl"> |
|||
<h1 className="text-center text-3xl mb-5 font-bold">Frequently Asked Questions</h1> |
|||
<p className="text-center mb-16 ">Have Questions ? We are here to help you !</p> |
|||
<div className="space-y-8"> |
|||
{faqs.map((faq, index) => ( |
|||
<Table |
|||
key={index} |
|||
faq={faq} |
|||
isActive={activeIndex === index} |
|||
onClick={() => toggleFAQ(index)} |
|||
/> |
|||
))} |
|||
</div> |
|||
</div> |
|||
); |
|||
}; |
|||
|
|||
export default FAQ; |
@ -0,0 +1,40 @@ |
|||
"use client" |
|||
|
|||
import React from "react"; |
|||
import { motion } from "framer-motion"; |
|||
|
|||
interface TableProps { |
|||
faq: { |
|||
question: string; |
|||
answer: string; |
|||
}; |
|||
isActive: boolean; |
|||
onClick: () => void; |
|||
} |
|||
|
|||
const Table: React.FC<TableProps> = ({ faq, isActive, onClick }) => { |
|||
return ( |
|||
<div className="border-b pb-4"> |
|||
<h3 |
|||
className="text-xl font-semibold flex justify-between items-center cursor-pointer" |
|||
onClick={onClick} |
|||
> |
|||
{faq.question} |
|||
<span>{isActive ? "-" : "+"}</span> |
|||
</h3> |
|||
<motion.div |
|||
initial={false} |
|||
animate={{ height: isActive ? "auto" : 0 }} |
|||
transition={{ duration: 0.4, ease: [0.6, 0.01, -0.05, 0.95] }} |
|||
style={{ overflow: "hidden" }} |
|||
> |
|||
<p className={`mt-2 text-gray-700 ${isActive ? "block" : "hidden"}`}> |
|||
{faq.answer} |
|||
</p> |
|||
</motion.div> |
|||
</div> |
|||
); |
|||
}; |
|||
|
|||
export default Table; |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue