-
Notifications
You must be signed in to change notification settings - Fork 155
feat: add Privacy Policy and Terms & Conditions pages #426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vv-verse
wants to merge
1
commit into
GitMetricsLab:main
Choose a base branch
from
vv-verse:feat/privacy-terms-pages
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| import { motion } from "framer-motion"; | ||
|
|
||
| interface Section { | ||
| title: string; | ||
| content: string; | ||
| } | ||
|
|
||
| interface LegalPageLayoutProps { | ||
| title: string; | ||
| intro: string; | ||
| sections: Section[]; | ||
| } | ||
|
|
||
| const LegalPageLayout = ({ title, intro, sections }: LegalPageLayoutProps) => { | ||
| return ( | ||
| <div className="bg-gradient-to-br from-white to-gray-100 dark:from-gray-900 dark:to-gray-800 text-black dark:text-white min-h-screen"> | ||
|
|
||
| {/* Hero */} | ||
| <section className="py-24 text-center"> | ||
| <motion.h1 | ||
| className="text-5xl font-extrabold mb-4" | ||
| initial={{ opacity: 0, y: -20 }} | ||
| animate={{ opacity: 1, y: 0 }} | ||
| transition={{ duration: 0.6 }} | ||
| > | ||
| {title} | ||
| </motion.h1> | ||
| <motion.p | ||
| className="text-xl max-w-xl mx-auto text-gray-600 dark:text-gray-300" | ||
| initial={{ opacity: 0 }} | ||
| animate={{ opacity: 1 }} | ||
| transition={{ delay: 0.2, duration: 0.6 }} | ||
| > | ||
| Last updated:{" "} | ||
| {new Date().toLocaleDateString("en-US", { | ||
| year: "numeric", | ||
| month: "long", | ||
| day: "numeric", | ||
| })} | ||
| </motion.p> | ||
| </section> | ||
|
|
||
| {/* Content */} | ||
| <section className="py-12 px-6 max-w-4xl mx-auto space-y-10 pb-24"> | ||
| <motion.p | ||
| className="text-gray-700 dark:text-gray-300 text-lg leading-relaxed" | ||
| initial={{ opacity: 0 }} | ||
| animate={{ opacity: 1 }} | ||
| transition={{ delay: 0.3, duration: 0.6 }} | ||
| > | ||
| {intro} | ||
| </motion.p> | ||
|
|
||
| {sections.map((section, idx) => ( | ||
| <motion.div | ||
| key={idx} | ||
| className="p-8 bg-white dark:bg-gray-800 shadow-md rounded-2xl border border-gray-100 dark:border-gray-700" | ||
| initial={{ opacity: 0, y: 30 }} | ||
| whileInView={{ opacity: 1, y: 0 }} | ||
| transition={{ delay: idx * 0.1, duration: 0.5 }} | ||
| > | ||
| <h2 className="text-2xl font-bold mb-3 text-indigo-600 dark:text-indigo-400"> | ||
| {section.title} | ||
| </h2> | ||
| <p className="text-gray-600 dark:text-gray-300 leading-relaxed"> | ||
| {section.content} | ||
| </p> | ||
| </motion.div> | ||
| ))} | ||
| </section> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default LegalPageLayout; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import LegalPageLayout from "../../components/legal/LegalPageLayout"; | ||
|
|
||
| const sections = [ | ||
| { | ||
| title: "Information We Collect", | ||
| content: | ||
| "We collect information you provide directly, such as your GitHub username when using our tracker. We also collect usage data including pages visited and features used to improve our service.", | ||
| }, | ||
| { | ||
| title: "How We Use Your Information", | ||
| content: | ||
| "We use collected information to provide and improve our services, respond to your requests, and send relevant updates. We do not sell your personal information to third parties.", | ||
| }, | ||
| { | ||
| title: "Data Storage & Security", | ||
| content: | ||
| "Your data is stored securely using industry-standard encryption. We retain your information only as long as necessary to provide our services or as required by law.", | ||
| }, | ||
| { | ||
| title: "Third-Party Services", | ||
| content: | ||
| "GitHub Tracker uses the public GitHub API to fetch repository and contribution data. We are not responsible for GitHub's privacy practices. Please review GitHub's Privacy Policy for more information.", | ||
| }, | ||
| { | ||
| title: "Cookies", | ||
| content: | ||
| "We use session cookies to manage authentication. These cookies are essential for the service to function and are deleted when you close your browser or log out.", | ||
| }, | ||
| { | ||
| title: "Your Rights", | ||
| content: | ||
| "You have the right to access, correct, or delete your personal data at any time. To exercise these rights, please contact us through the Contact page.", | ||
| }, | ||
| { | ||
| title: "Changes to This Policy", | ||
| content: | ||
| "We may update this Privacy Policy from time to time. We will notify you of significant changes by posting the new policy on this page with an updated date.", | ||
| }, | ||
| ]; | ||
|
|
||
| const PrivacyPolicy = () => ( | ||
| <LegalPageLayout | ||
| title="Privacy Policy" | ||
| intro="At GitHub Tracker, we are committed to protecting your privacy. This policy explains what information we collect, how we use it, and your rights regarding your data." | ||
| sections={sections} | ||
| /> | ||
| ); | ||
|
|
||
| export default PrivacyPolicy; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import LegalPageLayout from "../../components/legal/LegalPageLayout"; | ||
|
|
||
| const sections = [ | ||
| { | ||
| title: "Acceptance of Terms", | ||
| content: | ||
| "By accessing or using GitHub Tracker, you agree to be bound by these Terms and Conditions. If you do not agree to these terms, please do not use our service.", | ||
| }, | ||
| { | ||
| title: "Use of Service", | ||
| content: | ||
| "GitHub Tracker is provided for personal and professional use to track GitHub activity. You agree not to misuse the service, attempt unauthorized access, or use it for any unlawful purpose.", | ||
| }, | ||
| { | ||
| title: "GitHub API Usage", | ||
| content: | ||
| "Our service relies on the public GitHub API. Usage is subject to GitHub's Terms of Service and API rate limits. We are not affiliated with or endorsed by GitHub, Inc.", | ||
| }, | ||
| { | ||
| title: "User Accounts", | ||
| content: | ||
| "You are responsible for maintaining the confidentiality of your account credentials. You agree to notify us immediately of any unauthorized use of your account.", | ||
| }, | ||
| { | ||
| title: "Intellectual Property", | ||
| content: | ||
| "All content, design, and code within GitHub Tracker is the intellectual property of its contributors. You may not reproduce or distribute any part of the service without explicit permission.", | ||
| }, | ||
| { | ||
| title: "Disclaimer of Warranties", | ||
| content: | ||
| "GitHub Tracker is provided as-is without warranties of any kind. We do not guarantee uninterrupted or error-free service and are not liable for any data loss or damages.", | ||
| }, | ||
| { | ||
| title: "Changes to Terms", | ||
| content: | ||
| "We reserve the right to modify these terms at any time. Continued use of the service after changes constitutes your acceptance of the new terms.", | ||
| }, | ||
| ]; | ||
|
|
||
| const TermsAndConditions = () => ( | ||
| <LegalPageLayout | ||
| title="Terms & Conditions" | ||
| intro="Please read these Terms and Conditions carefully before using GitHub Tracker. These terms govern your use of our service and constitute a legal agreement between you and GitHub Tracker." | ||
| sections={sections} | ||
| /> | ||
| ); | ||
|
|
||
| export default TermsAndConditions; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dynamic date computation is misleading for legal pages.
Computing "Last updated" using
new Date()means the date will always show today, not the actual last update date of the legal content. This is misleading for users and potentially problematic for legal compliance, as these dates should reflect when the policy was genuinely last modified.📅 Proposed fix: Accept lastUpdated as a prop
Update the interface to accept a
lastUpdatedstring:interface LegalPageLayoutProps { title: string; intro: string; sections: Section[]; + lastUpdated: string; }Then use the prop instead of computing the date:
Update both page components to pass the actual last updated date:
🤖 Prompt for AI Agents