feat: auxiliary pages migrated to Next.js (Blog, Videos, Track, Success)
This commit is contained in:
1 parent
976dfcd610
commit
ee0b8a5ff8
8 files changed
+48
-15
No files matched your search
@@ -13,7 +13,10 @@ import {
|
||||
import { useCartStore } from "../store/cartStore";
|
||||
import { usePetStore } from "../store/usePetStore";
|
||||
|
||||
export default function OrderSuccess({ orderId, onNavigate }: { orderId: string; onNavigate: (v: any) => void }) {
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
export default function OrderSuccess({ orderId }: { orderId: string }) {
|
||||
const router = useRouter();
|
||||
const { orders } = useCartStore();
|
||||
const { getActivePet } = usePetStore();
|
||||
const order = orders.find(o => o.id === orderId);
|
||||
@@ -90,13 +93,13 @@ export default function OrderSuccess({ orderId, onNavigate }: { orderId: string;
|
||||
|
||||
<div className="space-y-4">
|
||||
<button
|
||||
onClick={() => onNavigate('order-tracking')}
|
||||
onClick={() => router.push('/track')}
|
||||
className="w-full bg-medical-gray-900 text-white py-5 rounded-2xl font-black text-lg hover:bg-canina-blue transition-all"
|
||||
>
|
||||
مشاهده و پیگیری زنده سفارش
|
||||
</button>
|
||||
<button
|
||||
onClick={() => onNavigate('shop')}
|
||||
onClick={() => router.push('/shop')}
|
||||
className="flex items-center justify-center gap-2 w-full text-medical-gray-400 font-bold hover:text-canina-blue transition-colors"
|
||||
>
|
||||
<ChevronLeft className="w-4 h-4" />
|
||||
|
||||
Reference in new issue
Block a user