Skip to content

Commit 5bc3ad1

Browse files
committed
Add Privacy Policy page and link in footer
- Introduced a new PrivacyPolicy component with styled content. - Added a route for the Privacy Policy in App.tsx. - Updated the footer to include a link to the Privacy Policy.
1 parent da76e8d commit 5bc3ad1

3 files changed

Lines changed: 612 additions & 46 deletions

File tree

src/App.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ const InitialChat = lazy(
4949
() =>
5050
import("./routes/chat/components/molecules/InitialChat/InitialChat.tsx"),
5151
);
52+
const PrivacyPolicy = lazy(
53+
() => import("./routes/privacy-policy/PrivacyPolicy.tsx"),
54+
);
5255

5356
type Auth0UserType = {
5457
getIdTokenClaims: () => Promise<any>;
@@ -182,6 +185,7 @@ function App() {
182185
<Route path="/texts/:id" element={<Texts />} />
183186
<Route path="/works/:id" element={<Works />} />
184187
<Route path="/search" element={<SearchResultsPage />} />
188+
<Route path="/privacy-policy" element={<PrivacyPolicy />} />
185189
<Route
186190
path="/:username/:sheetSlugAndId"
187191
element={<SheetChapters />}

src/routes/footer/Footer.tsx

Lines changed: 62 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
FaLinkedinIn,
88
FaYoutube,
99
} from "react-icons/fa";
10+
import { Link } from "react-router-dom";
1011

1112
type LinkItem = {
1213
href: string;
@@ -79,60 +80,75 @@ const connectLinks = [
7980
const Footer = () => {
8081
const { t } = useTranslate();
8182
return (
82-
<footer className="flex max-sm:space-y-8 max-sm:flex-col border-t border-custom-border px-3 py-4 sm:p-6 md:py-12 lg:px-8">
83-
<div className="flex-1 items-center justify-center">
84-
<div className="flex w-full flex-col text-start">
85-
<div className=" flex items-center">
86-
<img
87-
src="/img/webuddhist_logo.svg"
88-
alt="logo"
89-
width={150}
90-
height={150}
91-
/>
92-
</div>
93-
<div className="flex w-full max-w-xl">
94-
<p className="text-sm md:text-base text-muted-foreground">
95-
Buddhism in your own words
96-
</p>
97-
</div>
98-
<div className="flex mt-4 w-full items-center space-x-4">
99-
{connectLinks.map(({ href, icon }) => (
100-
<span className="p-2 bg-[#deac2c] rounded-full" key={href}>
101-
<a
102-
href={href}
103-
target="_blank"
104-
rel="noopener noreferrer"
105-
className="text-white"
106-
>
107-
{icon}
108-
</a>
109-
</span>
110-
))}
111-
</div>
112-
</div>
113-
</div>
114-
<div className="flex-1 md:flex md:justify-around grid grid-cols-2 md:grid-cols-4 gap-4">
115-
{columns.map(({ title, links }) => (
116-
<div key={title} className="text-left">
117-
<h3 className=" text-faded-grey uppercase overalltext font-semibold mb-2 text-sm">
118-
{t(title)}
119-
</h3>
120-
<ul className="list-none p-0 m-0 flex flex-col gap-2">
121-
{links.map(({ href, labelKey }) => (
122-
<li key={labelKey}>
83+
<footer className="border-t border-custom-border">
84+
<div className="flex max-sm:space-y-8 max-sm:flex-col px-3 py-4 sm:p-6 md:py-12 lg:px-8">
85+
<div className="flex-1 items-center justify-center">
86+
<div className="flex w-full flex-col text-start">
87+
<div className=" flex items-center">
88+
<img
89+
src="/img/webuddhist_logo.svg"
90+
alt="logo"
91+
width={150}
92+
height={150}
93+
/>
94+
</div>
95+
<div className="flex w-full max-w-xl">
96+
<p className="text-sm md:text-base text-muted-foreground">
97+
Buddhism in your own words
98+
</p>
99+
</div>
100+
<div className="flex mt-4 w-full items-center space-x-4">
101+
{connectLinks.map(({ href, icon }) => (
102+
<span className="p-2 bg-[#deac2c] rounded-full" key={href}>
123103
<a
124104
href={href}
125105
target="_blank"
126106
rel="noopener noreferrer"
127-
className={`text-faded-grey ${getLanguageClass("en-san")} text-sm hover:text-black transition-colors`}
107+
className="text-white"
128108
>
129-
{labelKey}
109+
{icon}
130110
</a>
131-
</li>
111+
</span>
132112
))}
133-
</ul>
113+
</div>
134114
</div>
135-
))}
115+
</div>
116+
<div className="flex-1 md:flex md:justify-around grid grid-cols-2 md:grid-cols-4 gap-4">
117+
{columns.map(({ title, links }) => (
118+
<div key={title} className="text-left">
119+
<h3 className=" text-faded-grey uppercase overalltext font-semibold mb-2 text-sm">
120+
{t(title)}
121+
</h3>
122+
<ul className="list-none p-0 m-0 flex flex-col gap-2">
123+
{links.map(({ href, labelKey }) => (
124+
<li key={labelKey}>
125+
<a
126+
href={href}
127+
target="_blank"
128+
rel="noopener noreferrer"
129+
className={`text-faded-grey ${getLanguageClass("en-san")} text-sm hover:text-black transition-colors`}
130+
>
131+
{labelKey}
132+
</a>
133+
</li>
134+
))}
135+
</ul>
136+
</div>
137+
))}
138+
</div>
139+
</div>
140+
<div className="border-t border-custom-border px-3 py-3 sm:px-6 lg:px-8 flex flex-col sm:flex-row items-center justify-between gap-2">
141+
<p className="text-xs text-muted-foreground">
142+
&copy; {new Date().getFullYear()} WeBuddhist · OpenPecha Trust. All
143+
rights reserved.
144+
</p>
145+
<Link
146+
to="/privacy-policy"
147+
className="text-xs text-muted-foreground hover:text-foreground transition-colors underline underline-offset-2"
148+
aria-label="Privacy Policy"
149+
>
150+
Privacy Policy
151+
</Link>
136152
</div>
137153
</footer>
138154
);

0 commit comments

Comments
 (0)