Skip to content

Commit 92d86a1

Browse files
authored
Merge pull request #182 from jiffy-labs/development
Development
2 parents 852b5f9 + 447bc1a commit 92d86a1

File tree

4 files changed

+105
-16
lines changed

4 files changed

+105
-16
lines changed

src/components/global/HeaderSection.tsx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,21 @@ const HeaderSectionGlobal: React.FC<HeaderSectionProps> = ({
107107
)}
108108
</div>
109109
</div>
110-
{item?.address !== '' && addressMapping && addressMapping[item?.address.toLowerCase()] && POWERED_BY_LOGO_MAP[addressMapping[item?.address.toLowerCase()].company.toLowerCase()] && (
111-
<div className="md:px-[16px] px-0 md:py-[8px] py-0">
112-
<span className="text-bluegrey-300 text-[10px] leading-5 flex items-center gap-2 font-normal">
113-
Powered By{' '}
114-
<img
115-
src={POWERED_BY_LOGO_MAP[addressMapping[item?.address.toLowerCase()].company.toLowerCase()].small}
116-
style={{ height: 20, width: 20 }}
117-
alt=""
118-
/>
119-
</span>
120-
</div>
121-
)}
110+
{item?.address && typeof item.address === 'string' && addressMapping &&
111+
addressMapping[item.address.toLowerCase()] &&
112+
addressMapping[item.address.toLowerCase()].company &&
113+
POWERED_BY_LOGO_MAP[addressMapping[item.address.toLowerCase()].company.toLowerCase()] && (
114+
<div className="md:px-[16px] px-0 md:py-[8px] py-0">
115+
<span className="text-bluegrey-300 text-[10px] leading-5 flex items-center gap-2 font-normal">
116+
Powered By{' '}
117+
<img
118+
src={POWERED_BY_LOGO_MAP[addressMapping[item.address.toLowerCase()].company.toLowerCase()].small}
119+
style={{ height: 20, width: 20 }}
120+
alt=""
121+
/>
122+
</span>
123+
</div>
124+
)}
122125
</div>
123126
</div>
124127
</section>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import React, { useState } from 'react';
2+
import { IoDocumentTextOutline } from "react-icons/io5";
3+
4+
const FeedbackCard = () => {
5+
const [formData, setFormData] = useState({ message: '', email: '' });
6+
7+
const handleChange = (e: { target: { id: any; value: any; }; }) => {
8+
const { id, value } = e.target;
9+
setFormData({ ...formData, [id]: value });
10+
};
11+
12+
const handleSubmit = (e: { preventDefault: () => void; }) => {
13+
e.preventDefault();
14+
15+
const { message, email } = formData;
16+
17+
// Create a well-structured feedback message body
18+
const mailtoLink = `mailto:[email protected]?subject=Feedback&body=${encodeURIComponent(`
19+
Hello JiffyScan Team,
20+
21+
I hope you're doing well. I wanted to provide some feedback on your platform:
22+
23+
"${message}"
24+
25+
Thank you for taking the time to consider my input. Please feel free to reach out if you need more details.
26+
27+
Best regards,
28+
${email}
29+
`)}`;
30+
31+
// Open user's email client with pre-filled subject, body, and email address
32+
window.location.href = mailtoLink;
33+
};
34+
35+
return (
36+
<div className="m-16 mx-auto md:max-w-2xl lg:max-w-[749px] p-4">
37+
<div className="rounded-xl border-2 lg:flex lg:items-center">
38+
<div className="sm:w-full sm:max-w-md py-8 px-6 lg:mt-0 lg:flex-1 lg:justify-center lg:items-center space-y-2">
39+
<p className="flex gap-2 font-inter font-medium items-center text-md sm:text-xl text-black">
40+
<IoDocumentTextOutline />
41+
Faced an Issue? Help us improve.
42+
</p>
43+
<form onSubmit={handleSubmit} className="space-y-4 sm:space-y-0 sm:flex sm:space-x-3">
44+
<div className="w-full">
45+
<label htmlFor="message" className="sr-only">Message</label>
46+
<input
47+
id="message"
48+
type="text"
49+
value={formData.message}
50+
onChange={handleChange}
51+
className="w-full md:w-[300px] lg:w-[341px] rounded-md border-1 px-5 py-3 text-black placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-700"
52+
placeholder="Write Message"
53+
required
54+
/>
55+
</div>
56+
<div className="w-full">
57+
<label htmlFor="email" className="sr-only">Email address</label>
58+
<input
59+
id="email"
60+
type="email"
61+
value={formData.email}
62+
onChange={handleChange}
63+
className="w-full md:w-[200px] lg:w-[220px] rounded-md border-1 px-5 py-3 text-black placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-700"
64+
placeholder="Your email"
65+
required
66+
/>
67+
</div>
68+
<button
69+
type="submit"
70+
className="mt-3 flex w-full lg:w-[108px] items-center justify-center rounded-md bg-[#2c85df] px-5 py-3 text-base font-medium text-white hover:bg-gray-400 focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-700 sm:mt-0 sm:w-auto"
71+
>
72+
Send
73+
</button>
74+
</form>
75+
</div>
76+
</div>
77+
</div>
78+
);
79+
}
80+
81+
export default FeedbackCard;

src/components/global/footer/Footer.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ import Copyright from './Copyright';
77
import Donations from './Donations';
88
import pages from './pages.json';
99
import socials from './social.json';
10+
import FeedbackCard from './FeedbackCard';
11+
1012

1113
function Footer() {
1214
return (
15+
<>
16+
<FeedbackCard/>
1317
<footer className="bg-dark-600 py-8 md:py-12 text-white">
1418
<div className="container flex flex-col gap-8 md:gap-12">
1519
<div className=" flex md:flex-row flex-col md:justify-between md:items-center">
@@ -66,6 +70,7 @@ function Footer() {
6670
</div>
6771
</div>
6872
</footer>
73+
</>
6974
);
7075
}
7176

src/components/global/footer/pages.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"lists": [
66
[
77
"About Us",
8-
"https://adityaagarwal.notion.site/JiffyLabs-Pages-3d508d91ba414fa590c335b3dc1f64d7#a46942a916f048478c901cbf4c766e42"
8+
"https://www.jiffylabs.xyz/about-us"
99
],
1010
[
1111
"Contact Us",
@@ -20,8 +20,8 @@
2020
"id": 456,
2121
"name": "Community",
2222
"lists": [
23-
["Blog", "https://medium.com/jiffylabs"],
24-
["API Documentation", "https://jiffyscan.readme.io/reference/getting-started-1"],
23+
["Blog", "https://jiffylabs.hashnode.dev/"],
24+
["API Documentation", "https://jiffyscan.mintlify.app/welcome"],
2525
["Knowledge Base", "https://www.notion.so/Knowledge-Base-c8b7f786de5141a7baaffd30cef8fe30"],
2626
["FAQ", "https://www.notion.so/5b080715834745ff82339c8ca73a76cb"],
2727
["Submit an Issue", "https://github.com/jiffy-labs/jiffyscan-frontend/issues"]
@@ -31,7 +31,7 @@
3131
"id": 567,
3232
"name": "Products & Services",
3333
"lists": [
34-
["API Plans", "https://www.notion.so/c3633ff3f9ea4aeeb1892ae1303439ba"],
34+
["API Plans", "https://www.jiffylabs.xyz/pricing"],
3535
["Explorer-as-a-service", "https://www.notion.so/c3633ff3f9ea4aeeb1892ae1303439ba"],
3636
["GasFee Infrastructure", "https://www.notion.so/c3633ff3f9ea4aeeb1892ae1303439ba"]
3737
]

0 commit comments

Comments
 (0)