Skip to content

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

Merged
mehul-m-prajapati merged 2 commits into
GitMetricsLab:mainfrom
vv-verse:feat/privacy-terms-pages
May 29, 2026
Merged

feat: add Privacy Policy and Terms & Conditions pages#426
mehul-m-prajapati merged 2 commits into
GitMetricsLab:mainfrom
vv-verse:feat/privacy-terms-pages

Conversation

@vv-verse
Copy link
Copy Markdown
Contributor

@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 Privacy Policy page with full policy content and dedicated route.
    • Added a Terms & Conditions page outlining usage, rights, and IP details with its own route.
    • Added quick links in the footer to access both policy pages.
    • Introduced a shared legal page layout with animated hero, "Last updated" date, and section cards.

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 25f6237
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a19bf8536e5b500080f12d2
😎 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

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: db08e9b1-279b-4d38-b0a0-19cf25b54d2d

📥 Commits

Reviewing files that changed from the base of the PR and between 420b664 and 25f6237.

📒 Files selected for processing (2)
  • src/Routes/Router.tsx
  • src/components/Footer.tsx

📝 Walkthrough

Walkthrough

Adds a reusable LegalPageLayout and two pages (Privacy Policy, Terms & Conditions), registers routes for them, and updates the footer Quick Links to expose the new pages.

Changes

Legal Pages Feature

Layer / File(s) Summary
LegalPageLayout component
src/components/legal/LegalPageLayout.tsx
TypeScript Section and LegalPageLayoutProps interfaces; renders animated gradient hero with title and computed "Last updated" date, animated intro, and animated per-section cards (Framer Motion).
Privacy Policy and Terms & Conditions pages
src/pages/PrivacyPolicy/PrivacyPolicy.tsx, src/pages/TermsAndConditions/TermsAndConditions.tsx
Each page defines a sections array of titled legal content and renders LegalPageLayout with title, intro, and sections; both export default components.
Route registration
src/Routes/Router.tsx
Imports PrivacyPolicy and TermsAndConditions and adds /privacy-policy and /terms-and-conditions routes to the app router.
Footer navigation links
src/components/Footer.tsx
Adds FaShieldAlt and FaFileContract icon imports; extends Quick Links with routed links to /privacy-policy and /terms-and-conditions.

🎯 3 (Moderate) | ⏱️ ~20 minutes


Possibly related PRs

Poem

"I'm a rabbit with a scroll and quill,
I hopped to write the pages still,
Privacy and Terms in line,
Footer paths now lead just fine,
Signed with a paw — cheerful and chill." 🐇📜

🚥 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.

@mehul-m-prajapati mehul-m-prajapati merged commit 4ea4d5c into GitMetricsLab:main May 29, 2026
5 of 6 checks passed
@github-actions
Copy link
Copy Markdown

🎉🎉 Thank you for your contribution! Your PR #426 has been merged! 🎉🎉

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

2 participants