Initial commit - Route Commerce platform

This commit is contained in:
2026-06-01 19:40:55 +00:00
commit 53a9671461
617 changed files with 106132 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
"use client";
import { useEffect } from "react";
import { useCart } from "@/context/CartContext";
type Props = { userId: string };
export default function CartHydration({ userId }: Props) {
const { loadServerCart } = useCart();
useEffect(() => {
if (!userId) return;
loadServerCart(userId).catch(() => {});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [userId]);
return null;
}