Skip to content

Convert currency display from USD to Nigerian Naira - #3

Merged
dapoadedire merged 4 commits into
mainfrom
copilot/change-currency-to-naira
Dec 9, 2025
Merged

Convert currency display from USD to Nigerian Naira#3
dapoadedire merged 4 commits into
mainfrom
copilot/change-currency-to-naira

Conversation

Copilot AI commented Dec 9, 2025

Copy link
Copy Markdown

Change All Currency to Naira ✅

This PR successfully changes all currency displays from US Dollars ($) to Nigerian Naira (₦) throughout the application, as this is a Nigerian campus marketplace tool.

Changes Completed:

  • Analyze repository structure and identify files with currency displays
  • Update marketplace page price display ($482 → ₦)
  • Update marketplace page filter labels (Under $50 → Under ₦50,000, etc.)
  • Update item detail page price display ($458 → ₦)
  • Update item edit page price label (Price ($) → Price (₦))
  • Update my listings page price display ($409 → ₦)
  • Update favorites page price display ($287 → ₦)
  • Update profile page price display ($372 → ₦)
  • Update new item page price label (Price ($) → Price (₦))
  • Update related items price display ($661 → ₦)
  • Update price range filter values to appropriate Naira amounts (multiplied by 1000)
  • Extract price range constants for better maintainability
  • Move PRICE_RANGES outside component to avoid recreation on every render
  • Update new item placeholder to "50000.00" for consistency
  • Verify TypeScript compilation
  • Final review

Technical Details:

  • All price displays now use Nigerian locale formatting: ₦{price.toLocaleString('en-NG', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}
  • Price range filters adjusted to Nigerian market values (₦50,000 - ₦500,000+)
  • Price range constants extracted and moved outside component for performance
  • Form labels updated from "Price ($)" to "Price (₦)"
  • Placeholder values adjusted to reflect realistic Naira amounts consistently across all forms

Files Modified:

  • frontend/app/marketplace/page.tsx - Price display, filters, filter logic, and PRICE_RANGES optimization
  • frontend/app/items/[id]/page.tsx - Item detail and related items price display
  • frontend/app/items/[id]/edit/page.tsx - Edit form price label and placeholder
  • frontend/app/items/new/page.tsx - New item form price label and placeholder
  • frontend/app/my-listings/page.tsx - Listing card price display
  • frontend/app/favorites/page.tsx - Favorite item card price display
  • frontend/app/profile/[id]/page.tsx - User profile item price display

Security Summary:

No security vulnerabilities introduced. All changes are cosmetic, affecting only the display formatting of existing price data. The underlying data structure and validation remain unchanged.

Original prompt

change all currency to naira. this is a nigerian tool. thanks

Created from VS Code via the GitHub Pull Request extension.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel

vercel Bot commented Dec 9, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
offloadr Ready Ready Preview Comment Dec 9, 2025 2:53pm

Co-authored-by: dapoadedire <95668340+dapoadedire@users.noreply.github.com>
Co-authored-by: dapoadedire <95668340+dapoadedire@users.noreply.github.com>
Copilot AI changed the title [WIP] Change all currency to naira Convert currency display from USD to Nigerian Naira Dec 9, 2025
Copilot AI requested a review from dapoadedire December 9, 2025 14:40
@dapoadedire
dapoadedire marked this pull request as ready for review December 9, 2025 14:43
Copilot AI review requested due to automatic review settings December 9, 2025 14:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR successfully converts the Offloadr campus marketplace from USD to Nigerian Naira (₦) currency throughout the frontend application. The changes align with the Nigerian market context and implement a comprehensive currency conversion with appropriate price scaling (1000x multiplier for realistic Naira pricing).

Key changes implemented:

  • Currency display formatting: All price displays now use Nigerian Naira symbol (₦) with proper locale formatting using toLocaleString('en-NG')
  • Price range filters: Updated from USD ranges ($50-$500) to Naira ranges (₦50,000-₦500,000) with new PRICE_RANGES constants
  • Form labels and placeholders: Updated input labels from "Price ($)" to "Price (₦)" with adjusted placeholder values

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/app/marketplace/page.tsx Added PRICE_RANGES constants, updated filter labels to Naira ranges, and converted price display format
frontend/app/items/[id]/page.tsx Updated item detail and related items price displays to Naira format
frontend/app/items/[id]/edit/page.tsx Changed form label to "Price (₦)" and updated placeholder to "50000.00"
frontend/app/items/new/page.tsx Updated form label to "Price (₦)"
frontend/app/my-listings/page.tsx Converted listing price display to Naira format
frontend/app/favorites/page.tsx Updated favorite items price display to Naira format
frontend/app/profile/[id]/page.tsx Converted profile page item price displays to Naira format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/app/marketplace/page.tsx Outdated
Comment on lines +63 to +70
const PRICE_RANGES = {
LOW_MAX: 50000,
MID_MIN: 50000,
MID_MAX: 100000,
HIGH_MIN: 100000,
HIGH_MAX: 500000,
PREMIUM_MIN: 500000,
};

Copilot AI Dec 9, 2025

Copy link

Choose a reason for hiding this comment

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

The PRICE_RANGES constant should be defined outside the component function to avoid recreating it on every render. Move this constant definition above the MarketplaceContent function declaration to improve performance.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Moved PRICE_RANGES constant outside the component function to avoid recreation on every render. (commit ad2be85)

render={({ field }) => (
<FormItem>
<FormLabel>Price ($)</FormLabel>
<FormLabel>Price ()</FormLabel>

Copilot AI Dec 9, 2025

Copy link

Choose a reason for hiding this comment

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

The label was updated to "Price (₦)" but the placeholder remains "0.00". For consistency with the edit page (which uses "50000.00"), consider updating the placeholder to reflect a realistic Nigerian Naira amount, such as "50000.00".

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated placeholder from "0.00" to "50000.00" for consistency with the edit page. (commit ad2be85)

…tency

Co-authored-by: dapoadedire <95668340+dapoadedire@users.noreply.github.com>
Copilot AI requested a review from dapoadedire December 9, 2025 14:54
@dapoadedire
dapoadedire merged commit 93519da into main Dec 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants