feat: TASK-120 - add quick share dosage and product info button to ProductPage

This commit is contained in:
parsa aghaei committed 2026-07-26 16:15:44 +03:30
1 parent 9236a2b1ab
commit 167983bbbb
3 files changed
+39 -10

No files matched your search

@@ -29,7 +29,8 @@ import {
Users,
ShoppingBag,
Thermometer,
AlertTriangle
AlertTriangle,
Share2
} from "lucide-react";
const ICON_MAP: Record<string, any> = {
@@ -193,13 +194,27 @@ export default function ProductPage({ productSlug }: { productSlug: string }) {
<span className="text-canina-blue font-black">{product.nameFa || product.name}</span>
</div>
<button
onClick={() => router.back()}
className="px-3.5 py-1.5 bg-white border border-medical-gray-200 rounded-lg text-medical-gray-600 shadow-xs flex items-center gap-1.5 font-bold text-xs hover:border-canina-blue hover:text-canina-blue transition-all whitespace-nowrap"
>
<ChevronRight className="w-3.5 h-3.5" />
<span>بازگشت</span>
</button>
<div className="flex items-center gap-2">
<button
onClick={() => {
if (navigator.clipboard) {
navigator.clipboard.writeText(window.location.href);
toast.success("لینک مشخصات و دوز دارویی محصول کپی شد");
}
}}
className="px-3.5 py-1.5 bg-canina-blue/5 border border-canina-blue/20 rounded-lg text-canina-blue shadow-xs flex items-center gap-1.5 font-bold text-xs hover:bg-canina-blue hover:text-white transition-all whitespace-nowrap"
>
<Share2 className="w-3.5 h-3.5" />
<span>اشتراک‌گذاری دوز</span>
</button>
<button
onClick={() => router.back()}
className="px-3.5 py-1.5 bg-white border border-medical-gray-200 rounded-lg text-medical-gray-600 shadow-xs flex items-center gap-1.5 font-bold text-xs hover:border-canina-blue hover:text-canina-blue transition-all whitespace-nowrap"
>
<ChevronRight className="w-3.5 h-3.5" />
<span>بازگشت</span>
</button>
</div>
</div>
{/* Global Single Grid Layout - Aligns Sticky Buy Box at the Top */}