feat(cms-builder-videos-hydration-catalog): resolve IDE Prisma types, fix Header hydration error, add Media Upload & Aparat embed to Admin Videos, fix Catalog scrollbar/spacing, and overhaul CMS into section-by-section Visual Page Builder

This commit is contained in:
parsa aghaei committed 2026-07-27 12:25:36 +03:30
1 parent 2b1bd9efcb
commit 3e9fffe71f
7 files changed
+419 -146

No files matched your search

@@ -97,11 +97,11 @@ export default function CatalogClient() {
/>
</div>
<div className="flex items-center gap-2 overflow-x-auto w-full md:w-auto pb-2 md:pb-0">
<div className="flex items-center gap-2.5 overflow-x-auto no-scrollbar scrollbar-none w-full md:w-auto p-1.5 scroll-smooth">
<button
onClick={() => setSelectedCategory("all")}
className={`px-4 py-2.5 rounded-xl text-xs font-black transition-all shrink-0 ${
selectedCategory === "all" ? "bg-canina-blue text-white shadow-md" : "bg-slate-100 text-slate-600 hover:bg-slate-200"
className={`px-5 py-3 rounded-2xl text-xs font-black transition-all shrink-0 shadow-xs ${
selectedCategory === "all" ? "bg-canina-blue text-white shadow-md scale-105" : "bg-slate-100 text-slate-700 hover:bg-slate-200"
}`}
>
همه دسته‌ها ({products.length})
@@ -110,8 +110,8 @@ export default function CatalogClient() {
<button
key={cat}
onClick={() => setSelectedCategory(cat)}
className={`px-4 py-2.5 rounded-xl text-xs font-black transition-all shrink-0 ${
selectedCategory === cat ? "bg-canina-blue text-white shadow-md" : "bg-slate-100 text-slate-600 hover:bg-slate-200"
className={`px-5 py-3 rounded-2xl text-xs font-black transition-all shrink-0 shadow-xs ${
selectedCategory === cat ? "bg-canina-blue text-white shadow-md scale-105" : "bg-slate-100 text-slate-700 hover:bg-slate-200"
}`}
>
{cat}
+5 -1
View File
@@ -78,6 +78,10 @@ export default function Header({
]);
const petMenuRef = useRef<HTMLDivElement>(null);
const [isMounted, setIsMounted] = useState(false);
useEffect(() => {
setIsMounted(true);
}, []);
const { getTotalItems } = useCartStore();
const { pets, activePetId, setActivePet, getActivePet } = usePetStore();
const { role, isLoggedIn, logout, profile } = useUserStore();
@@ -217,7 +221,7 @@ export default function Header({
>
<ShoppingBag className="w-4 h-4" />
<span className="hidden sm:inline">سبد خرید</span>
{getTotalItems() > 0 && (
{isMounted && getTotalItems() > 0 && (
<span className="w-5 h-5 bg-canina-gold text-canina-dark rounded-full text-[10px] font-black flex items-center justify-center">
{getTotalItems()}
</span>