Skip to content

Commit cfaf07f

Browse files
committed
Faq section added to the pricing section
1 parent 64e96a3 commit cfaf07f

File tree

3 files changed

+81
-6
lines changed

3 files changed

+81
-6
lines changed

src/views/landing-page/Navbar.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const Navbar = () => {
3434
hidden
3535
text-white
3636
bg-[#6C47FF]
37-
hover:bg-blue-800
37+
3838
focus:ring-4
3939
focus:outline-none
4040
focus:ring-blue-300
@@ -69,7 +69,7 @@ const Navbar = () => {
6969
hidden
7070
text-[#6C47FF]
7171
bg-[#DCD4FF]
72-
hover:bg-blue-800
72+
7373
focus:ring-4
7474
focus:outline-none
7575
focus:ring-blue-300
@@ -217,7 +217,7 @@ const Navbar = () => {
217217
block
218218
text-white
219219
bg-[#6C47FF]
220-
hover:bg-blue-800
220+
221221
focus:ring-4
222222
focus:outline-none
223223
focus:ring-blue-300
@@ -240,7 +240,9 @@ const Navbar = () => {
240240
"
241241
>
242242
<Link href='https://dashboard.jiffyscan.xyz/'>
243+
<button>
243244
View API Key
245+
</button>
244246
</Link>
245247
</button>
246248
<button
@@ -272,7 +274,9 @@ const Navbar = () => {
272274
"
273275
>
274276
<Link href='https://www.jiffyscan.xyz/'>
277+
<button>
275278
Explorer
279+
</button>
276280
</Link>
277281
</button>
278282

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import React, { useState } from 'react';
2+
3+
const Faq = () => {
4+
const [openQuestion, setOpenQuestion] = useState(null);
5+
6+
const toggleQuestion = (index:any) => {
7+
setOpenQuestion(openQuestion === index ? null : index);
8+
};
9+
10+
const faqs = [
11+
{ question: "How do I subscribe to JiffyScan API services?", answer: "You can sign up to our API services by filling the onboarding form" },
12+
{ question: "How do I cancel or upgrade my account?", answer: "Please contact us should you wish to upgrade or cancel your account. We will assist you accordingly." },
13+
{ question: "What are the payment options available?", answer: "We accept all the popular payment methods supported by stripe." },
14+
{ question: "What is the refund policy?", answer: "Since there’s a free tier to test out the services, payments made on paid tier are non-refundable and we do not provide refunds or credits for any services already paid for. You can cancel the subscription to prevent any future charges." },
15+
];
16+
17+
return (
18+
<section className="py-10 sm:py-16 lg:py-24">
19+
<div className="px-4 mx-auto sm:px-6 lg:px-8 max-w-7xl">
20+
<div className="max-w-2xl mx-auto text-center">
21+
<h2 className="text-xl md:text-[48px] font-medium font-poppins leading-tight text-black">
22+
Frequently asked Questions
23+
</h2>
24+
</div>
25+
<div className="max-w-5xl mx-auto mt-8 space-y-5 md:mt-16 ">
26+
{faqs.map((faq, index) => (
27+
<div
28+
key={index}
29+
className={`transition-all duration-200 bg-[#F5F5F5] rounded-lg border border-gray-200 shadow-lg cursor-pointer hover:bg-gray-50 ${openQuestion === index ? 'open' : ''}`}
30+
onClick={() => toggleQuestion(index)}
31+
>
32+
<button
33+
type="button"
34+
className="flex items-center justify-between w-full px-4 py-5 sm:p-6"
35+
>
36+
<span className="flex md:text-xl font-medium font-inter text-black">{faq.question}</span>
37+
<svg
38+
xmlns="http://www.w3.org/2000/svg"
39+
fill="none"
40+
viewBox="0 0 24 24"
41+
stroke="currentColor"
42+
className={`w-6 h-6 text-gray-400 transition-transform duration-200 transform ${openQuestion === index ? 'rotate-0' : 'rotate-180'}`}
43+
>
44+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M19 9l-7 7-7-7" />
45+
</svg>
46+
</button>
47+
<div
48+
className={`px-4 pb-5 sm:px-6 sm:pb-6 ${openQuestion === index ? 'block' : 'hidden'}`}
49+
>
50+
<p>{faq.answer}</p>
51+
</div>
52+
</div>
53+
))}
54+
</div>
55+
<p className="text-center text-gray-600 text-base mt-9">
56+
Still have questions?{' '}
57+
<span className="cursor-pointer font-medium text-tertiary transition-all duration-200 hover:text-tertiary focus:text-tertiary hover-underline">
58+
Contact our support
59+
</span>
60+
</p>
61+
</div>
62+
</section>
63+
);
64+
};
65+
66+
export default Faq;

src/views/landing-page/components/PricingSection.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import Faq from './Faq';
23

34
const PricingSection = () => {
45
return (
@@ -17,7 +18,7 @@ const PricingSection = () => {
1718
</p>
1819
<a
1920
href="#"
20-
className="mt-8 block h-[50px] w-full bg-[#6C47FF] rounded-md py-2 text-xl font-semibold text-white text-center"
21+
className="mt-8 block h-[50px] w-full bg-[#6C47FF] rounded-md py-2 text-xl font-semibold text-white text-center content-center"
2122
>
2223
<button>
2324
Get Free API Key
@@ -60,7 +61,7 @@ const PricingSection = () => {
6061
</p>
6162
<a
6263
href="#"
63-
className="mt-4 block font-poppins h-[50px] w-full bg-[#6C47FF] rounded-md py-2 text-xl font-semibold text-white text-center"
64+
className="mt-4 block font-poppins h-[50px] w-full bg-[#6C47FF] rounded-md py-2 text-xl font-semibold text-white text-center content-center"
6465
>
6566
<button>
6667
Continue
@@ -116,7 +117,7 @@ const PricingSection = () => {
116117
</p>
117118
<a
118119
href="#"
119-
className="mt-4 block font-poppins h-[50px] w-full bg-[#6C47FF] rounded-md py-2 text-xl font-semibold text-white text-center"
120+
className="mt-4 block font-poppins h-[50px] w-full bg-[#6C47FF] rounded-md py-2 text-xl font-semibold text-white text-center content-center"
120121
>
121122
<button>
122123
Continue
@@ -260,6 +261,10 @@ const PricingSection = () => {
260261
</div>
261262
</div>
262263
</div>
264+
265+
<div>
266+
<Faq/>
267+
</div>
263268
</div>
264269
);
265270
};

0 commit comments

Comments
 (0)