Build the Salar Store storefront and connect products, blogs, and home specials to the Meshkee API.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
2783305f07
commit
7d26eaa838
@@ -0,0 +1,46 @@
|
||||
import Link from "next/link";
|
||||
|
||||
type Crumb = {
|
||||
name: string;
|
||||
href?: string;
|
||||
};
|
||||
|
||||
type Props = {
|
||||
title: string;
|
||||
english: string;
|
||||
crumbs?: Crumb[];
|
||||
};
|
||||
|
||||
export function PageHero({ title, english, crumbs }: Props) {
|
||||
const trail = crumbs ?? [{ name: title }];
|
||||
|
||||
return (
|
||||
<div className="page-hero border-b border-black/5">
|
||||
<div className="container-site flex items-end justify-between gap-4 py-4 md:py-5">
|
||||
<div className="min-w-0">
|
||||
<p className="text-xs text-zinc-400 mb-1">
|
||||
<Link href="/" className="hover:text-brand">
|
||||
خانه
|
||||
</Link>
|
||||
{trail.map((crumb) => (
|
||||
<span key={crumb.name}>
|
||||
<span className="mx-1.5">/</span>
|
||||
{crumb.href ? (
|
||||
<Link href={crumb.href} className="hover:text-brand">
|
||||
{crumb.name}
|
||||
</Link>
|
||||
) : (
|
||||
<span>{crumb.name}</span>
|
||||
)}
|
||||
</span>
|
||||
))}
|
||||
</p>
|
||||
<h1 className="text-xl md:text-2xl font-extrabold">{title}</h1>
|
||||
</div>
|
||||
<p dir="ltr" className="shrink-0 pb-0.5 font-carter text-[10px] tracking-[0.4em] text-zinc-400 uppercase">
|
||||
{english}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user