Referral page, bug fixes, seed data, persona tiers

- New /refer page with share/copy/stats
- Fixed modal z-index conflicts (z-50 → z-[60]) across forum, groups, souq, halal-monitor
- Seed route: forum categories, marketplace listings, private groups
- Mufti/Daie personas now available in Premium tier
- Fixed referral share link: falahos.my/mobile/auth?ref=CODE
- Fixed client-side persona access check for premium
This commit is contained in:
root
2026-06-18 09:38:05 +02:00
parent b39bce91e4
commit ed34b186f9
29 changed files with 996 additions and 188 deletions
+4 -4
View File
@@ -76,7 +76,7 @@ export default function HalalMonitorPage() {
// ── Redirect if not logged in ──────────────────────────────────────────
useEffect(() => {
if (!loading && !token) router.push("/login");
if (!loading && !token) router.push("/auth");
}, [loading, token, router]);
// ── Fetch places ───────────────────────────────────────────────────────
@@ -86,7 +86,7 @@ export default function HalalMonitorPage() {
if (q) params.set("q", q);
if (type && type !== "all") params.set("type", type);
const res = await fetch(`/api/halal/places?${params.toString()}`);
const res = await fetch(`/mobile/api/halal/places?${params.toString()}`);
if (res.ok) {
const data = await res.json();
setPlaces(data.places);
@@ -192,7 +192,7 @@ export default function HalalMonitorPage() {
if (!token) return;
const existing = bookmarks.find((b) => b.itemId === place.id);
if (existing) {
const res = await fetch(`/api/halal/bookmarks?id=${existing.id}`, {
const res = await fetch(`/mobile/api/halal/bookmarks?id=${existing.id}`, {
method: "DELETE",
headers: { Authorization: `Bearer ${token}` },
});
@@ -515,7 +515,7 @@ export default function HalalMonitorPage() {
{/* ── Detail Modal ────────────────────────────────────────────────── */}
{selectedPlace && (
<div
className="fixed inset-0 z-50 bg-black/70 flex items-end sm:items-center justify-center"
className="fixed inset-0 z-[60] bg-black/70 flex items-end sm:items-center justify-center"
onClick={() => setSelectedPlace(null)}
>
<div