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
+3 -3
View File
@@ -63,7 +63,7 @@ function NurChat() {
/* Redirect if not logged in */
useEffect(() => {
if (!loading && !token) {
router.push("/login");
router.push("/auth");
}
}, [loading, token, router]);
@@ -74,7 +74,7 @@ function NurChat() {
const loadData = async () => {
try {
const [historyRes, dailyRes] = await Promise.all([
fetch(`/api/chat/history/${user.id}`, {
fetch(`/mobile/api/chat/history/${user.id}`, {
headers: { Authorization: `Bearer ${token}` },
}),
fetch("/mobile/api/chat/daily", {
@@ -406,7 +406,7 @@ function PersonaSelector({
const canAccess = (personaId: string) => {
if (personaId === "nurbuddy") return true;
if (isPro) return true;
if (isPremium && ["alim", "hakim", "murabbi"].includes(personaId)) return true;
if (isPremium && ["alim", "hakim", "murabbi", "mufti", "daie"].includes(personaId)) return true;
return false;
};