Skip to content

feat: add Privacy Policy and Terms & Conditions pages#426

Open
vv-verse wants to merge 1 commit into
GitMetricsLab:mainfrom
vv-verse:feat/privacy-terms-pages
Open

feat: add Privacy Policy and Terms & Conditions pages#426
vv-verse wants to merge 1 commit into
GitMetricsLab:mainfrom
vv-verse:feat/privacy-terms-pages

Conversation

@vv-verse
Copy link
Copy Markdown

@vv-verse vv-verse commented May 22, 2026

Summary

Adds Privacy Policy and Terms & Conditions pages with reusable layout architecture and footer navigation links.

Closes #420


Changes Made

  • Added reusable layout component:

    • src/components/legal/LegalPageLayout.tsx
  • Added Privacy Policy page:

    • src/pages/PrivacyPolicy/PrivacyPolicy.tsx
  • Added Terms & Conditions page:

    • src/pages/TermsAndConditions/TermsAndConditions.tsx
  • Added routes for:

    • /privacy-policy
    • /terms-and-conditions
    • Updated: src/Routes/Router.tsx
  • Added footer navigation links:

    • Updated: src/components/Footer.tsx
  • Added responsive layout, dark mode support, and Framer Motion animations consistent with the existing UI


Architecture Decision

Both legal pages shared nearly identical:

  • layout structure

  • hero section

  • animations

  • responsive styling

Instead of duplicating large JSX blocks across multiple files, a reusable:

LegalPageLayout

component was introduced to improve:

  • maintainability

  • consistency

  • readability

  • component reuse

Each page now only contains page-specific content and configuration.


Design Consistency

  • Consistent with existing Tailwind styling

  • Framer Motion animations aligned with existing pages

  • Full dark mode support

  • Responsive layout across screen sizes


Testing

  • /privacy-policy renders correctly

  • /terms-and-conditions renders correctly

  • Footer links navigate properly

  • Dark mode works on both pages

  • npm run build completes successfully


Screenshots

##Before :

image

##After :

image


Type of Change

  • New feature

  • UI enhancement

  • Code refactor

Summary by CodeRabbit

  • New Features
    • Added a dedicated Privacy Policy page with comprehensive information about data handling and privacy practices.
    • Added a dedicated Terms & Conditions page outlining service usage policies, user rights, and intellectual property information.
    • Added quick navigation links in the footer for easy access to both policy pages.

Review Change Stack

- Add reusable LegalPageLayout component (src/components/legal/)
- Add PrivacyPolicy page at /privacy-policy
- Add TermsAndConditions page at /terms-and-conditions
- Register both routes in Router.tsx
- Add footer navigation links with FaShieldAlt and FaFileContract icons
- Consistent design with existing pages (motion, dark mode, Tailwind)
@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 420b664
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a10bce554fd310008abe6de
😎 Deploy Preview https://deploy-preview-426--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

The PR adds Privacy Policy and Terms & Conditions pages to the application. A reusable LegalPageLayout component provides animated rendering of legal page content; both new pages populate it with their respective sections. Routes are registered in the router, and footer navigation links are added to make both pages discoverable.

Changes

Legal Pages Feature

Layer / File(s) Summary
LegalPageLayout component
src/components/legal/LegalPageLayout.tsx
TypeScript interfaces define Section (title and content) and LegalPageLayoutProps (title, intro, sections). Component renders an animated gradient page with hero title, computed "Last updated" date, animated intro text, and per-section cards with Framer Motion animations.
Privacy Policy and Terms & Conditions pages
src/pages/PrivacyPolicy/PrivacyPolicy.tsx, src/pages/TermsAndConditions/TermsAndConditions.tsx
PrivacyPolicy and TermsAndConditions components each define a sections array with legal content headings and text, then render LegalPageLayout with title, intro, and sections. Both export as default exports.
Route registration
src/Routes/Router.tsx
Imports PrivacyPolicy and TermsAndConditions components and adds two new routes: /privacy-policy and /terms-and-conditions, each rendering the corresponding page component.
Footer navigation links
src/components/Footer.tsx
Adds FaShieldAlt and FaFileContract icon imports. Quick Links section is extended with two new routed links: "Privacy Policy" and "Terms & Conditions", wired to the new routes.

🎯 2 (Simple) | ⏱️ ~10 minutes


Possibly related PRs


Suggested labels

level:intermediate, quality:clean


🐰 Legal pages have found their home,
With layouts shared and paths well-known,
From Privacy Policies to Terms so fine,
The footer now guides users down the line,
A feature complete, both snug and well-sewn! 📜✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding Privacy Policy and Terms & Conditions pages.
Description check ✅ Passed The description provides comprehensive details on changes, architecture decisions, design consistency, testing, screenshots, and issue closure, covering all template requirements.
Linked Issues check ✅ Passed The PR fully implements all objectives from issue #420: adds both pages with reusable LegalPageLayout, registers routes, updates footer links, and maintains design consistency with existing stack.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #420 requirements; no out-of-scope modifications detected in router, footer, layout, or page component additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/components/Footer.tsx (1)

86-100: 💤 Low value

Inconsistent indentation in new footer links.

The new Privacy Policy and Terms & Conditions links (lines 86-100) appear to have inconsistent indentation compared to the existing Contact Us and About links (lines 70-84). While this doesn't affect functionality, maintaining consistent formatting improves code readability and maintainability.

♻️ Proposed fix for consistent formatting

Adjust the indentation to match the existing links:

-
-              <Link
-  to="/privacy-policy"
-  className="inline-flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors"
->
-  <FaShieldAlt className="h-3.5 w-3.5" />
-  Privacy Policy
-</Link>
-
-<Link
-  to="/terms-and-conditions"
-  className="inline-flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors"
->
-  <FaFileContract className="h-3.5 w-3.5" />
-  Terms &amp; Conditions
-</Link>
+
+              <Link
+                to="/privacy-policy"
+                className="inline-flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors"
+              >
+                <FaShieldAlt className="h-3.5 w-3.5" />
+                Privacy Policy
+              </Link>
+
+              <Link
+                to="/terms-and-conditions"
+                className="inline-flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors"
+              >
+                <FaFileContract className="h-3.5 w-3.5" />
+                Terms &amp; Conditions
+              </Link>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/Footer.tsx` around lines 86 - 100, The new Link blocks for
Privacy Policy and Terms & Conditions in the Footer component have inconsistent
indentation; reformat the JSX so the <Link ...> elements (the ones using
FaShieldAlt and FaFileContract) match the same indentation/style as the existing
Contact Us and About links—align opening tags, props, and children lines
consistently, preserve the className and icon usages, and ensure closing tags
line up with the other link blocks for readability.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/legal/LegalPageLayout.tsx`:
- Around line 34-40: The LegalPageLayout component currently computes the "Last
updated" date with new Date(), which is misleading; update the LegalPageLayout
props/interface to accept a lastUpdated: string prop, replace the new Date()
usage in the render (the motion.p that prints "Last updated") to display the
passed lastUpdated prop instead, and update the page components that use
LegalPageLayout (e.g., PrivacyPolicy.tsx and TermsAndConditions.tsx) to pass the
canonical last updated string (e.g., "January 1, 2025") when rendering the
layout.

---

Nitpick comments:
In `@src/components/Footer.tsx`:
- Around line 86-100: The new Link blocks for Privacy Policy and Terms &
Conditions in the Footer component have inconsistent indentation; reformat the
JSX so the <Link ...> elements (the ones using FaShieldAlt and FaFileContract)
match the same indentation/style as the existing Contact Us and About
links—align opening tags, props, and children lines consistently, preserve the
className and icon usages, and ensure closing tags line up with the other link
blocks for readability.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b1d21773-a601-483f-a6e5-b8bd5dab9ae3

📥 Commits

Reviewing files that changed from the base of the PR and between 9d34c19 and 420b664.

📒 Files selected for processing (5)
  • src/Routes/Router.tsx
  • src/components/Footer.tsx
  • src/components/legal/LegalPageLayout.tsx
  • src/pages/PrivacyPolicy/PrivacyPolicy.tsx
  • src/pages/TermsAndConditions/TermsAndConditions.tsx

Comment on lines +34 to +40
Last updated:{" "}
{new Date().toLocaleDateString("en-US", {
year: "numeric",
month: "long",
day: "numeric",
})}
</motion.p>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

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 lastUpdated string:

 interface LegalPageLayoutProps {
   title: string;
   intro: string;
   sections: Section[];
+  lastUpdated: string;
 }

Then use the prop instead of computing the date:

-          Last updated:{" "}
-          {new Date().toLocaleDateString("en-US", {
-            year: "numeric",
-            month: "long",
-            day: "numeric",
-          })}
+          Last updated: {lastUpdated}

Update both page components to pass the actual last updated date:

// In PrivacyPolicy.tsx and TermsAndConditions.tsx
<LegalPageLayout
  title="..."
  intro="..."
  sections={sections}
  lastUpdated="January 1, 2025"
/>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/legal/LegalPageLayout.tsx` around lines 34 - 40, The
LegalPageLayout component currently computes the "Last updated" date with new
Date(), which is misleading; update the LegalPageLayout props/interface to
accept a lastUpdated: string prop, replace the new Date() usage in the render
(the motion.p that prints "Last updated") to display the passed lastUpdated prop
instead, and update the page components that use LegalPageLayout (e.g.,
PrivacyPolicy.tsx and TermsAndConditions.tsx) to pass the canonical last updated
string (e.g., "January 1, 2025") when rendering the layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add Privacy Policy and Terms & Conditions pages

1 participant