Add guest cart drawer, Continue handoff, and shared customer login.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-25 17:33:39 +03:30
co-authored by Cursor
parent ad05241a77
commit 16340c3b48
18 changed files with 1082 additions and 97 deletions
+16
View File
@@ -195,6 +195,22 @@ export async function getCategoryBySlug(slug: string) {
return categories.find((category) => category.slug === slug) ?? null;
}
export type ApiTenant = {
id: string | number;
name: string;
nameFa?: string | null;
slug?: string;
domain?: string;
};
export async function getTenant() {
try {
return await apiGet<ApiTenant>(`/tenants/${API.domain}`);
} catch {
return null;
}
}
export async function getComments(entityType: "product" | "blog", entityId: string) {
try {
const data = await apiGet<{ items: ApiComment[] }>(`${tenant()}/comments`, { entityType, entityId });