Skip to content

Commit e3a9beb

Browse files
committed
privacy policy, terms and conditions pages updated
1 parent a7202f8 commit e3a9beb

File tree

5 files changed

+570
-12
lines changed

5 files changed

+570
-12
lines changed

client-test/src/App.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import LoginPage from './components/Login';
55
import RegisterPage from './components/SignUp';
66
import Leaderboard from './components/Leaderboard';
77
import AboutPage from './components/About';
8+
import PrivacyPolicyPage from './components/PrivacyPolicy';
9+
import TermsConditionsPage from './components/TermsConditions';
810
import ProfilePage from './components/ProfilePage';
911
import ResetPassword from './components/ResetPassword.tsx';
1012
import ForgotPassword from './components/ForgotPassword';
@@ -32,6 +34,8 @@ function UserApp() {
3234
<Route path="/challenges" element={<Challenges />} />
3335
<Route path="/login" element={<LoginPage />} />
3436
<Route path="/about" element={<AboutPage />} />
37+
<Route path="/privacy-policy" element={<PrivacyPolicyPage />} />
38+
<Route path="/terms-conditions" element={<TermsConditionsPage />} />
3539
<Route path="/register" element={<RegisterPage />} />
3640
<Route path="/leaderboard" element={<Leaderboard />} />
3741
<Route path="/profile/edit-profile" element={<EditProfile />} />
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
"use client"
2+
3+
import { useState, useEffect } from "react"
4+
import { Shield, Eye, Cookie, Database, Mail, Users, Calendar } from "lucide-react"
5+
import { motion } from "framer-motion"
6+
import { Card, CardContent } from "@/components/ui/card"
7+
import { DottedBackground } from "../dotted-background"
8+
import ScrollToTopButton from "../scrolltotop"
9+
10+
// Loading skeleton component
11+
const LoadingSkeleton = () => (
12+
<div className="relative w-full min-h-screen">
13+
<DottedBackground />
14+
<div className="relative z-10 container mx-auto py-10 px-4">
15+
<div className="animate-pulse space-y-8">
16+
<div className="h-12 bg-gray-300 rounded-lg w-1/2 mx-auto"></div>
17+
<div className="space-y-4">
18+
{[...Array(8)].map((_, i) => (
19+
<div key={i} className="h-32 bg-gray-300 rounded-lg"></div>
20+
))}
21+
</div>
22+
</div>
23+
</div>
24+
</div>
25+
)
26+
27+
export default function PrivacyPolicyPage() {
28+
const [isLoading, setIsLoading] = useState(true)
29+
30+
useEffect(() => {
31+
const timer = setTimeout(() => {
32+
setIsLoading(false)
33+
}, 500)
34+
return () => clearTimeout(timer)
35+
}, [])
36+
37+
const containerVariants = {
38+
hidden: { opacity: 0 },
39+
visible: {
40+
opacity: 1,
41+
transition: {
42+
duration: 0.6,
43+
staggerChildren: 0.1,
44+
delayChildren: 0.2
45+
}
46+
}
47+
}
48+
49+
const itemVariants = {
50+
hidden: { opacity: 0, y: 20 },
51+
visible: {
52+
opacity: 1,
53+
y: 0,
54+
transition: { duration: 0.6 }
55+
}
56+
}
57+
58+
const sections = [
59+
{
60+
icon: <Eye className="h-6 w-6" />,
61+
title: "Information We Collect",
62+
content: [
63+
"Account Information: When you create an account, we collect your username, email address, college name, and profile information.",
64+
"Coding Activity: We track your participation in daily challenges, submissions, scores, and leaderboard rankings.",
65+
"Platform Integration: We may collect data from integrated platforms like LeetCode, CodeChef, and GeeksforGeeks to track your coding progress."
66+
]
67+
},
68+
{
69+
icon: <Database className="h-6 w-6" />,
70+
title: "How We Use Your Information",
71+
content: [
72+
"Platform Functionality: To provide core features like challenges, leaderboards, and profile management.",
73+
"Performance Tracking: To monitor your coding progress and provide personalized recommendations.",
74+
"Communication: To send important updates about challenges, events, and platform changes.",
75+
"Community Features: To enable interactions within the SRKRCoding Club community.",
76+
"Platform Improvement: To analyze usage patterns and improve our services.",
77+
"Security: To protect against fraud, unauthorized access, and maintain platform security."
78+
]
79+
},
80+
{
81+
icon: <Users className="h-6 w-6" />,
82+
title: "Information Sharing",
83+
content: [
84+
"Public Information: Your username, college, and leaderboard rankings are publicly visible to other users.",
85+
"Third-Party Integrations: We may share necessary data with coding platforms (LeetCode, CodeChef, GFG) to sync your progress.",
86+
"Service Providers: We may share data with trusted service providers who help us operate the platform.",
87+
"Legal Requirements: We may disclose information if required by law or to protect our rights and users' safety.",
88+
"We do not sell, rent, or trade your personal information to third parties for marketing purposes."
89+
]
90+
},
91+
{
92+
icon: <Cookie className="h-6 w-6" />,
93+
title: "Cookies and Tracking",
94+
content: [
95+
"Essential Cookies: We use cookies necessary for platform functionality, such as keeping you logged in.",
96+
"Analytics Cookies: We may use cookies to understand how users interact with our platform to improve services.",
97+
"Preference Cookies: We store your settings and preferences to enhance your user experience.",
98+
"You can manage cookie preferences through your browser settings, though some features may not work properly if disabled."
99+
]
100+
},
101+
{
102+
icon: <Shield className="h-6 w-6" />,
103+
title: "Data Security",
104+
content: [
105+
"Encryption: We use industry-standard encryption to protect data in transit and at rest.",
106+
"Access Controls: We implement strict access controls to limit who can access your personal information.",
107+
"Regular Audits: We regularly review and update our security practices to protect user data.",
108+
"Incident Response: We have procedures in place to respond to potential security breaches promptly.",
109+
"While we implement strong security measures, no system is 100% secure. We encourage users to use strong, unique passwords."
110+
]
111+
},
112+
{
113+
icon: <Database className="h-6 w-6" />,
114+
title: "Data Retention",
115+
content: [
116+
"Active Accounts: We retain your data as long as your account is active and you continue using our services.",
117+
"Inactive Accounts: We may retain data from inactive accounts for a reasonable period to allow for account reactivation.",
118+
"Legal Requirements: Some data may be retained longer if required by law or for legitimate business purposes.",
119+
"Data Deletion: You can request deletion of your account and associated data by contacting us.",
120+
"Anonymized Data: We may retain anonymized, non-personally identifiable data for analytics and platform improvement."
121+
]
122+
},
123+
{
124+
icon: <Users className="h-6 w-6" />,
125+
title: "Your Rights",
126+
content: [
127+
"Access: You can request access to the personal information we have about you.",
128+
"Correction: You can update or correct your personal information through your profile settings.",
129+
"Deletion: You can request deletion of your account and associated data.",
130+
"Data Portability: You can request a copy of your data in a portable format.",
131+
"Opt-out: You can opt out of non-essential communications and certain data processing activities.",
132+
"To exercise these rights, please contact us at srkrcodingclubofficial@gmail.com."
133+
]
134+
},
135+
{
136+
icon: <Mail className="h-6 w-6" />,
137+
title: "Contact Information",
138+
content: [
139+
"If you have questions about this Privacy Policy or our data practices, please contact us:",
140+
"Email: srkrcodingclubofficial@gmail.com",
141+
"Organization: SRKRCoding Club, SRKR Engineering College",
142+
"We will respond to privacy-related inquiries within 30 days.",
143+
"For urgent privacy concerns, please mark your email as 'URGENT - Privacy Concern'."
144+
]
145+
}
146+
]
147+
148+
if (isLoading) {
149+
return <LoadingSkeleton />
150+
}
151+
152+
return (
153+
<div className="relative w-full min-h-screen">
154+
<DottedBackground />
155+
<motion.div
156+
className="relative z-10"
157+
initial="hidden"
158+
animate="visible"
159+
variants={containerVariants}
160+
>
161+
<div className="container mx-auto py-10 px-4 text-gray-800 max-w-4xl">
162+
{/* Header */}
163+
<motion.div className="text-center mb-12" variants={itemVariants}>
164+
<div className="flex justify-center mb-6">
165+
<div className="bg-primary/10 p-4 rounded-full">
166+
<Shield className="h-12 w-12 text-primary" />
167+
</div>
168+
</div>
169+
<h1 className="text-4xl font-bold mb-4">
170+
<span className="bg-clip-text text-transparent bg-gradient-to-r from-primary to-primary/70">
171+
Privacy Policy
172+
</span>
173+
</h1>
174+
<p className="text-lg text-muted-foreground max-w-2xl mx-auto">
175+
Your privacy is important to us. This policy explains how we collect, use, and protect your information on the CodeQuest platform.
176+
</p>
177+
178+
</motion.div>
179+
180+
{/* Introduction */}
181+
<motion.div className="mb-8" variants={itemVariants}>
182+
<Card className="border border-primary/10">
183+
<CardContent className="p-6">
184+
<p className="text-muted-foreground leading-relaxed">
185+
Welcome to CodeQuest, operated by SRKRCoding Club. This Privacy Policy describes how we collect,
186+
use, disclose, and safeguard your information when you use our coding challenge platform.
187+
By using our services, you agree to the practices described in this policy.
188+
</p>
189+
</CardContent>
190+
</Card>
191+
</motion.div>
192+
193+
{/* Policy Sections */}
194+
<motion.div className="space-y-8" variants={containerVariants}>
195+
{sections.map((section, index) => (
196+
<motion.div key={index} variants={itemVariants}>
197+
<Card className="border border-primary/10 hover:border-primary/20 transition-colors duration-300">
198+
<CardContent className="p-6">
199+
<div className="flex items-start gap-4">
200+
<div className="bg-primary/10 p-3 rounded-lg flex-shrink-0">
201+
<div className="text-primary">
202+
{section.icon}
203+
</div>
204+
</div>
205+
<div className="flex-1">
206+
<h2 className="text-xl font-semibold text-primary mb-4">
207+
{section.title}
208+
</h2>
209+
<ul className="space-y-3">
210+
{section.content.map((item, itemIndex) => (
211+
<li key={itemIndex} className="flex items-start gap-3">
212+
<div className="w-2 h-2 bg-primary rounded-full mt-2 flex-shrink-0" />
213+
<span className="text-muted-foreground leading-relaxed">
214+
{item}
215+
</span>
216+
</li>
217+
))}
218+
</ul>
219+
</div>
220+
</div>
221+
</CardContent>
222+
</Card>
223+
</motion.div>
224+
))}
225+
</motion.div>
226+
227+
{/* Policy Updates */}
228+
<motion.div className="mt-12" variants={itemVariants}>
229+
<Card className="border border-primary/10 bg-primary/5">
230+
<CardContent className="p-6">
231+
<h3 className="text-lg font-semibold text-primary mb-3">Policy Updates</h3>
232+
<p className="text-muted-foreground leading-relaxed">
233+
We may update this Privacy Policy from time to time to reflect changes in our practices or
234+
applicable law. We will notify users of significant changes via email or platform notifications.
235+
Your continued use of the platform after such modifications constitutes acceptance of the updated policy.
236+
</p>
237+
</CardContent>
238+
</Card>
239+
</motion.div>
240+
</div>
241+
</motion.div>
242+
<ScrollToTopButton />
243+
</div>
244+
)
245+
}

client-test/src/components/SignUp/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default function RegisterPage() {
3232
const [error, setError] = useState<string>("");
3333
const [showPassword, setShowPassword] = useState(false); // State for password visibility
3434
const [showConfirmPassword, setShowConfirmPassword] = useState(false); // State for confirm password visibility
35+
const [acceptedTerms, setAcceptedTerms] = useState(false); // State for terms acceptance
3536

3637
const togglePasswordVisibility = () => {
3738
setShowPassword(!showPassword);

0 commit comments

Comments
 (0)