Update carousels, card hover, and IranBay branding.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-10-04 13:21:27 +03:30
co-authored by Cursor
commit 1153e8e78f
178 changed files with 30517 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
"use client";
import { useParams } from "next/navigation";
import AddBlogForm from "@/components/catalog/AddBlogForm";
import { en } from "@/lib/i18n/en";
export default function ManageAddBlogPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const listHref = `/manage/${encodeURIComponent(meshkeeId)}/blog`;
return (
<AddBlogForm
meshkeeId={meshkeeId}
listHref={listHref}
title={en.blog.addTitle}
lead={en.blog.addLead}
/>
);
}
+33
View File
@@ -0,0 +1,33 @@
"use client";
import Link from "next/link";
import { useParams } from "next/navigation";
import { BusinessListHeader } from "@/components/business/BusinessPageChrome";
import BlogPanel from "@/components/catalog/BlogPanel";
import { en } from "@/lib/i18n/en";
import styles from "@/components/BusinessDetailsPage.module.css";
export default function ManageBusinessBlogPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const addHref = `/manage/${encodeURIComponent(meshkeeId)}/blog/new`;
return (
<>
<BusinessListHeader
title={en.blog.title}
lead={en.blog.lead}
action={
<Link href={addHref} className={`outline-btn ${styles.actionBtn}`}>
{en.blog.add}
</Link>
}
/>
<BlogPanel
meshkeeId={meshkeeId}
emptyLabel={en.blog.empty}
addHref={addHref}
/>
</>
);
}
+18
View File
@@ -0,0 +1,18 @@
"use client";
import { useParams } from "next/navigation";
import { BusinessListHeader } from "@/components/business/BusinessPageChrome";
import GalleryPanel from "@/components/catalog/GalleryPanel";
import { en } from "@/lib/i18n/en";
export default function ManageBusinessGalleryPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
return (
<>
<BusinessListHeader title={en.gallery.title} lead={en.gallery.lead} />
<GalleryPanel meshkeeId={meshkeeId} emptyLabel={en.gallery.empty} />
</>
);
}
+53
View File
@@ -0,0 +1,53 @@
"use client";
import { useEffect } from "react";
import { useParams } from "next/navigation";
import { ProtectedRoute } from "@/components/AuthGuards";
import BusinessShell from "@/components/BusinessShell";
import { setManagedBusinessId } from "@/lib/managed-business";
import { useAuth } from "@/components/AuthProvider";
function ManageBusinessBootstrap({ children }: { children: React.ReactNode }) {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const { isLoading } = useAuth();
useEffect(() => {
if (meshkeeId) setManagedBusinessId(meshkeeId);
}, [meshkeeId]);
if (isLoading) {
return (
<div
style={{
minHeight: "100vh",
display: "grid",
placeItems: "center",
background: "#f6f6f6",
fontSize: 12,
letterSpacing: "0.2em",
textTransform: "uppercase",
color: "#8e8e8e",
}}
>
Loading
</div>
);
}
return (
<BusinessShell manageMeshkeeId={meshkeeId}>{children}</BusinessShell>
);
}
export default function ManageBusinessLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<ProtectedRoute requiredApp="admin">
<ManageBusinessBootstrap>{children}</ManageBusinessBootstrap>
</ProtectedRoute>
);
}
+12
View File
@@ -0,0 +1,12 @@
"use client";
import { redirect } from "next/navigation";
export default async function ManageBusinessIndex({
params,
}: {
params: Promise<{ meshkeeId: string }>;
}) {
const { meshkeeId } = await params;
redirect(`/manage/${meshkeeId}/profile`);
}
@@ -0,0 +1,20 @@
"use client";
import { useParams } from "next/navigation";
import AddPortfolioForm from "@/components/catalog/AddPortfolioForm";
import { en } from "@/lib/i18n/en";
export default function ManageAddPortfolioPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const listHref = `/manage/${encodeURIComponent(meshkeeId)}/portfolios`;
return (
<AddPortfolioForm
meshkeeId={meshkeeId}
listHref={listHref}
title={en.portfolios.addTitle}
lead={en.portfolios.addLead}
/>
);
}
@@ -0,0 +1,33 @@
"use client";
import Link from "next/link";
import { useParams } from "next/navigation";
import { BusinessListHeader } from "@/components/business/BusinessPageChrome";
import PortfoliosPanel from "@/components/catalog/PortfoliosPanel";
import { en } from "@/lib/i18n/en";
import styles from "@/components/BusinessDetailsPage.module.css";
export default function ManageBusinessPortfoliosPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const addHref = `/manage/${encodeURIComponent(meshkeeId)}/portfolios/new`;
return (
<>
<BusinessListHeader
title={en.portfolios.title}
lead={en.portfolios.lead}
action={
<Link href={addHref} className={`outline-btn ${styles.actionBtn}`}>
{en.portfolios.add}
</Link>
}
/>
<PortfoliosPanel
meshkeeId={meshkeeId}
emptyLabel={en.portfolios.empty}
addHref={addHref}
/>
</>
);
}
@@ -0,0 +1,23 @@
"use client";
import { useParams } from "next/navigation";
import ManageCategoriesPage from "@/components/catalog/ManageCategoriesPage";
import { en } from "@/lib/i18n/en";
export default function ManageProductCategoriesPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const listHref = `/manage/${encodeURIComponent(meshkeeId)}/products`;
return (
<ManageCategoriesPage
meshkeeId={meshkeeId}
entityType="product"
title={en.products.categoriesTitle}
lead={en.products.categoriesLead}
homeHref={`/manage/${encodeURIComponent(meshkeeId)}`}
listHref={listHref}
listLabel={en.products.title}
/>
);
}
@@ -0,0 +1,20 @@
"use client";
import { useParams } from "next/navigation";
import AddProductForm from "@/components/catalog/AddProductForm";
import { en } from "@/lib/i18n/en";
export default function ManageAddProductPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const listHref = `/manage/${encodeURIComponent(meshkeeId)}/products`;
return (
<AddProductForm
meshkeeId={meshkeeId}
listHref={listHref}
title={en.products.addTitle}
lead={en.products.addLead}
/>
);
}
+41
View File
@@ -0,0 +1,41 @@
"use client";
import Link from "next/link";
import { useParams } from "next/navigation";
import { BusinessListHeader } from "@/components/business/BusinessPageChrome";
import ProductsPanel from "@/components/catalog/ProductsPanel";
import { en } from "@/lib/i18n/en";
import styles from "@/components/BusinessDetailsPage.module.css";
export default function ManageBusinessProductsPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const base = `/manage/${encodeURIComponent(meshkeeId)}/products`;
return (
<>
<BusinessListHeader
title={en.products.title}
lead={en.products.lead}
action={
<>
<Link
href={`${base}/categories`}
className={`outline-btn ${styles.actionBtn}`}
>
{en.products.manageCategories}
</Link>
<Link href={`${base}/new`} className={`outline-btn ${styles.actionBtn}`}>
{en.products.add}
</Link>
</>
}
/>
<ProductsPanel
meshkeeId={meshkeeId}
emptyLabel={en.products.empty}
addHref={`${base}/new`}
/>
</>
);
}
+13
View File
@@ -0,0 +1,13 @@
"use client";
import { useParams } from "next/navigation";
import EditBusinessPage from "@/components/EditBusinessPage";
export default function ManageBusinessProfilePage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
return (
<EditBusinessPage meshkeeBusinessId={meshkeeId} variant="business" />
);
}