Skip to content
This repository was archived by the owner on Nov 11, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions frontend/vizzy/app/listing/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default function ProductListing({
{listingT('details.notFoundDesc')}
</p>
<Button
className="mt-6 bg-green-500 hover:bg-green-600"
className="mt-6 bg-green-500 hover:bg-green-600 cursor-pointer"
onClick={() => router.push('/')}
>
{listingT('details.browseOthers')}
Expand Down Expand Up @@ -270,7 +270,7 @@ export default function ProductListing({
variant="secondary"
className="bg-amber-50 text-amber-700"
>
Deposit Required
{listingT('details.deposit')}
</Badge>
)}
</div>
Expand Down Expand Up @@ -372,6 +372,11 @@ export default function ProductListing({
},
};

const outlineButtonClass =
'w-full border-[#2DCC70] text-[#2DCC70] hover:bg-[#E8F5E8] hover:border-[#25A85C] hover:text-[#25A85C] dark:border-[#2DCC70] dark:text-[#2DCC70] dark:hover:bg-[#1A4A2E] dark:hover:border-[#34D77A] dark:hover:text-[#34D77A] cursor-pointer';
const filledButtonClass =
'w-full bg-brand-700 text-white font-medium hover:bg-[#25A85C] dark:bg-[#2DCC70] dark:hover:bg-[#25A85C] cursor-pointer';

switch (listing.listing_type) {
case 'sale':
return (
Expand All @@ -380,10 +385,7 @@ export default function ProductListing({
<PurchaseProposalDialog
{...commonProps}
trigger={
<Button
variant="outline"
className="w-full border-green-200 text-green-700 hover:bg-green-50 hover:text-green-800"
>
<Button variant="outline" className={outlineButtonClass}>
{listingT('actions.makeOffer')}
</Button>
}
Expand All @@ -393,7 +395,7 @@ export default function ProductListing({
<BuyNowDialog
{...commonProps}
trigger={
<Button className="w-full bg-green-500 font-medium hover:bg-green-600">
<Button className={filledButtonClass}>
{getActionButtonText()}
</Button>
}
Expand All @@ -408,10 +410,7 @@ export default function ProductListing({
<RentalProposalDialog
{...commonProps}
trigger={
<Button
variant="outline"
className="w-full border-green-200 text-green-700 hover:bg-green-50 hover:text-green-800"
>
<Button variant="outline" className={outlineButtonClass}>
{listingT('actions.makeOffer')}
</Button>
}
Expand All @@ -420,7 +419,7 @@ export default function ProductListing({
<RentNowDialog
{...commonProps}
trigger={
<Button className="w-full bg-green-500 font-medium hover:bg-green-600">
<Button className={filledButtonClass}>
{getActionButtonText()}
</Button>
}
Expand All @@ -435,7 +434,7 @@ export default function ProductListing({
<ExchangeProposalDialog
{...commonProps}
trigger={
<Button className="w-full bg-green-500 font-medium hover:bg-green-600">
<Button className={filledButtonClass}>
{getActionButtonText()}
</Button>
}
Expand All @@ -450,7 +449,7 @@ export default function ProductListing({
<GiveawayProposalDialog
{...commonProps}
trigger={
<Button className="w-full bg-green-500 font-medium hover:bg-green-600">
<Button className={filledButtonClass}>
{getActionButtonText()}
</Button>
}
Expand Down Expand Up @@ -554,7 +553,9 @@ export default function ProductListing({
onClick={handleFavoriteClick}
disabled={isFavoriteLoading}
title={
isFavorite ? 'Remove from favorites' : 'Add to favorites'
isFavorite
? listingT('favorites.removeFromFavorites')
: listingT('favorites.addToFavorites')
}
>
{isFavorite ? (
Expand All @@ -563,7 +564,9 @@ export default function ProductListing({
<Heart className="h-4 w-4 text-muted-foreground" />
)}
<span className="sr-only">
{isFavorite ? 'Remove from favorites' : 'Add to favorites'}
{isFavorite
? listingT('favorites.removeFromFavorites')
: listingT('favorites.addToFavorites')}
</span>
</Button>
)}
Expand Down
7 changes: 6 additions & 1 deletion frontend/vizzy/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@
"browseOthers": "Browse Other Listings",
"negotiable": "Negotiable",
"depositRequired": "Deposit Required",
"sellerInfo": "Seller Information"
"sellerInfo": "Seller Information",
"deposit": "Deposit Required"
},
"actions": {
"buyNow": "Buy Now",
Expand Down Expand Up @@ -323,6 +324,10 @@
"favoriteRemovedDescription": "This listing was successfully removed from your favorites section.",
"favoriteError": "Failed to add/remove listing from favorites. Please try again.",
"favoriteErrorDescription": "An error occurred while adding/removing this listing from your favorites. Please try again later."
},
"favorites": {
"removeFromFavorites": "Remove from favorites",
"addToFavorites": "Add to favorites"
}
},
"homepage": {
Expand Down
7 changes: 6 additions & 1 deletion frontend/vizzy/messages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@
"browseOthers": "Explorar Outros Anúncios",
"negotiable": "Negociável",
"depositRequired": "Depósito Necessário",
"sellerInfo": "Informação do Vendedor"
"sellerInfo": "Informação do Vendedor",
"deposit": "Depósito Necessário"
},
"actions": {
"buyNow": "Comprar Agora",
Expand Down Expand Up @@ -322,6 +323,10 @@
"favoriteRemovedDescription": "Este anúncio foi removido com sucesso da tua lista de favoritos.",
"favoriteError": "Falha ao adicionar/remover anúncio aos/dos favoritos. Por favor, tenta novamente.",
"favoriteErrorDescription": "Ocorreu um erro ao adicionar/remover este anúncio aos/dos favoritos. Por favor, tenta novamente mais tarde."
},
"favorites": {
"removeFromFavorites": "Remover dos favoritos",
"addToFavorites": "Adicionar aos favoritos"
}
},
"homepage": {
Expand Down