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
@@ -42,7 +42,10 @@ const BLOG_POSTS = [
|
||||
}
|
||||
];
|
||||
|
||||
export default function BlogPage({ onBack, onProductClick }: { onBack: () => void, onProductClick: (p: Product) => void }) {
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
export default function BlogPage() {
|
||||
const router = useRouter();
|
||||
const [selectedPost, setSelectedPost] = React.useState<typeof BLOG_POSTS[0] | null>(null);
|
||||
const [products, setProducts] = React.useState<Product[]>([]);
|
||||
|
||||
@@ -56,7 +59,7 @@ export default function BlogPage({ onBack, onProductClick }: { onBack: () => voi
|
||||
<div className="max-w-7xl mx-auto">
|
||||
{/* Breadcrumbs */}
|
||||
<div className="flex items-center gap-2 text-[10px] font-black text-medical-gray-400 uppercase tracking-widest mb-10">
|
||||
<span className="cursor-pointer hover:text-canina-blue" onClick={onBack}>خانه</span>
|
||||
<span className="cursor-pointer hover:text-canina-blue" onClick={() => router.push('/')}>خانه</span>
|
||||
<ChevronRight className="w-2.5 h-2.5" />
|
||||
<span className="cursor-pointer hover:text-canina-blue" onClick={() => setSelectedPost(null)}>مجله سلامت</span>
|
||||
<ChevronRight className="w-2.5 h-2.5" />
|
||||
@@ -123,7 +126,7 @@ export default function BlogPage({ onBack, onProductClick }: { onBack: () => voi
|
||||
{products.slice(4, 7).map(p => (
|
||||
<div
|
||||
key={p.id}
|
||||
onClick={() => onProductClick(p)}
|
||||
onClick={() => router.push(`/shop/${p.id}`)}
|
||||
className="bg-white/10 border border-white/20 p-4 rounded-3xl flex items-center gap-4 cursor-pointer hover:bg-white/20 transition-all group"
|
||||
>
|
||||
<div className="w-16 h-16 bg-white rounded-2xl p-2 shrink-0 group-hover:scale-110 transition-transform">
|
||||
@@ -182,7 +185,7 @@ export default function BlogPage({ onBack, onProductClick }: { onBack: () => voi
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={onBack}
|
||||
onClick={() => router.push('/')}
|
||||
className="px-8 py-3 bg-white border border-medical-gray-200 rounded-2xl text-medical-gray-700 shadow-sm flex items-center gap-2 font-black hover:bg-medical-gray-50 transition-all"
|
||||
>
|
||||
<ChevronRight className="w-5 h-5" />
|
||||
@@ -316,7 +319,7 @@ export default function BlogPage({ onBack, onProductClick }: { onBack: () => voi
|
||||
تمامی مقالات این وبلاگ بر اساس کاتالوگهای رسمی و نتایج آزمایشگاهی کمپانی کانینا آلمان تدوین شده است.
|
||||
</p>
|
||||
<button
|
||||
onClick={() => onBack()}
|
||||
onClick={() => router.push('/shop')}
|
||||
className="bg-white text-canina-blue px-8 py-4 rounded-2xl font-black hover:scale-105 transition-transform"
|
||||
>
|
||||
مشاهده محصولات تخصصی
|
||||
@@ -326,7 +329,7 @@ export default function BlogPage({ onBack, onProductClick }: { onBack: () => voi
|
||||
{products.slice(0, 2).map((p) => (
|
||||
<div
|
||||
key={p.id}
|
||||
onClick={() => onProductClick(p)}
|
||||
onClick={() => router.push(`/shop/${p.id}`)}
|
||||
className="bg-white/10 border border-white/20 p-6 rounded-3xl cursor-pointer hover:bg-white/20 transition-all text-center group"
|
||||
>
|
||||
<img src={p.image} alt={p.name} className="w-20 h-20 mx-auto mb-4 object-contain filter brightness-0 invert group-hover:scale-110 transition-transform" />
|
||||
|
||||
Reference in new issue
Block a user