Skip to content

Commit eb97359

Browse files
authored
feat: Adding Chatbot to website (#402)
1 parent f4405d6 commit eb97359

File tree

2 files changed

+38
-7
lines changed

2 files changed

+38
-7
lines changed

src/components/pages/home/index.tsx

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
"use client";
2+
import { useEffect } from "react";
23
import Image from "next/image";
34
import { ButtonLong } from "@/components/core/buttons";
45
import { motion } from "framer-motion";
56

67
import Newsletter from "../../core/newsletter/index";
78

89
function HomePage({ accountId }: { accountId: string | undefined }) {
10+
useEffect(() => {
11+
// Initialize Tidio
12+
const tidioScript = document.createElement("script");
13+
tidioScript.src = "https://code.tidio.co/fdylvmddtyb7vzsk5frdt3ncrk6cwobs.js";
14+
tidioScript.async = true;
15+
document.body.appendChild(tidioScript);
16+
17+
return () => {
18+
// Clean up script when component unmounts
19+
document.body.removeChild(tidioScript);
20+
};
21+
}, []);
22+
923
return (
1024
<>
1125
<main className="max-w-screen-lg mx-auto px-4 md:px-10 lg:px-5">
@@ -138,7 +152,9 @@ function HomePage({ accountId }: { accountId: string | undefined }) {
138152
}}
139153
className="text-xl md:text-lg lg:text-xl text-center my-8 text-black dark:text-white md:text-right"
140154
>
141-
A social media platform built exclusively for design professionals to share, discover and discuss cutting-edge UI/UX designs and color palettes.
155+
A social media platform built exclusively for design professionals
156+
to share, discover and discuss cutting-edge UI/UX designs and
157+
color palettes.
142158
</motion.p>
143159
</article>
144160
</section>
@@ -171,7 +187,9 @@ function HomePage({ accountId }: { accountId: string | undefined }) {
171187
}}
172188
className="text-xl my-6 font-medium text-center text-secondary dark:text-white md:text-2xl md:text-left"
173189
>
174-
Are you a developer looking for design inspiration for your next website? Browse through a variety of styles by other developers and get inspired!
190+
Are you a developer looking for design inspiration for your next
191+
website? Browse through a variety of styles by other developers
192+
and get inspired!
175193
</motion.p>
176194
</article>
177195

@@ -198,7 +216,7 @@ function HomePage({ accountId }: { accountId: string | undefined }) {
198216
</motion.div>
199217
</figure>
200218
</section>
201-
219+
202220
<section className="flex items-center flex-col-reverse md:flex-row gap-4 mt-32 mb-32">
203221
<figure className="w-[70%]">
204222
<motion.div
@@ -249,15 +267,18 @@ function HomePage({ accountId }: { accountId: string | undefined }) {
249267
}}
250268
className="text-xl md:text-2xl text-center my-8 text-black dark:text-white md:text-right"
251269
>
252-
Show off your design talent through projects, blogs and get feedback from other developers. Partner up with others, be a part of a collaborative community.
270+
Share your UI/UX designs with a global audience and get feedback
271+
and insights from industry leaders.
253272
</motion.p>
254273
</article>
255274
</section>
256-
<section className="w-full">
257-
<Newsletter />
258-
</section>
275+
276+
<section className="mt-24 mb-8">
277+
<Newsletter />
278+
</section>
259279
</main>
260280
</>
261281
);
262282
}
283+
263284
export default HomePage;

yarn.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,16 @@ anymatch@~3.1.2:
10221022
normalize-path "^3.0.0"
10231023
picomatch "^2.0.4"
10241024

1025+
"appwrite-gen@file:C:\\Users\\hp\\palettegram\\appwrite-gen":
1026+
version "1.0.0"
1027+
resolved "file:appwrite-gen"
1028+
dependencies:
1029+
"@types/react" "^18.3.2"
1030+
dotenv "^16.3.1"
1031+
node-appwrite "^11.1.0"
1032+
ts-node "^10.9.2"
1033+
typescript "^5.3.3"
1034+
10251035
appwrite@15.0.0:
10261036
version "15.0.0"
10271037
resolved "https://registry.npmjs.org/appwrite/-/appwrite-15.0.0.tgz"

0 commit comments

Comments
 (0)