feat: implement core platform features including business directory, admin dashboard, authentication, and API infrastructure
Some checks failed
Build and Push App / build (push) Failing after 16m2s
Some checks failed
Build and Push App / build (push) Failing after 16m2s
This commit is contained in:
@@ -6,7 +6,6 @@ import Link from 'next/link';
|
||||
import { LayoutDashboard, Edit3, ShoppingBag, CreditCard, LogOut, Eye, MessageSquare, User as UserIcon, Rocket, ShieldAlert } from 'lucide-react';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import { User } from '../../types';
|
||||
import { MOCK_BUSINESSES } from '../../lib/mockData';
|
||||
import DashboardOverview from '../../components/dashboard/DashboardOverview';
|
||||
import DashboardProfile from '../../components/dashboard/DashboardProfile';
|
||||
import DashboardProfileClient from '../../components/dashboard/DashboardProfileClient';
|
||||
@@ -23,7 +22,7 @@ const DashboardContent = () => {
|
||||
|
||||
const [currentView, setCurrentView] = useState<'overview' | 'profile' | 'offers' | 'subscription' | 'messages' | 'personal-profile'>('overview');
|
||||
const [business, setBusiness] = useState<any>(null);
|
||||
const [stats, setStats] = useState<{ totalViews: number, contactClicks: number } | null>(null);
|
||||
const [stats, setStats] = useState<{ totalViews: number, contactClicks: number, dailyStats: any[] } | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [isMounted, setIsMounted] = useState(false);
|
||||
const [unreadCount, setUnreadCount] = useState(0);
|
||||
@@ -113,9 +112,9 @@ const DashboardContent = () => {
|
||||
// Update document title with unread count
|
||||
useEffect(() => {
|
||||
if (unreadCount > 0) {
|
||||
document.title = `(${unreadCount}) Messages - Afropreunariat`;
|
||||
document.title = `(${unreadCount}) Messages - Afrohub`;
|
||||
} else {
|
||||
document.title = 'Tableau de Bord - Afropreunariat';
|
||||
document.title = 'Tableau de Bord - Afrohub';
|
||||
}
|
||||
}, [unreadCount]);
|
||||
|
||||
@@ -153,6 +152,10 @@ const DashboardContent = () => {
|
||||
slug: "",
|
||||
tags: [],
|
||||
socialLinks: {},
|
||||
showEmail: true,
|
||||
showPhone: true,
|
||||
showSocials: true,
|
||||
plan: 'STARTER',
|
||||
verified: false,
|
||||
viewCount: 0,
|
||||
rating: 0,
|
||||
@@ -166,7 +169,7 @@ const DashboardContent = () => {
|
||||
<div className="flex items-center h-16 flex-shrink-0 px-4 border-b border-gray-200">
|
||||
<Link href="/" className="flex items-center gap-2">
|
||||
<div className="w-8 h-8 bg-brand-600 rounded-lg flex items-center justify-center text-white font-bold font-serif">A</div>
|
||||
<span className="font-serif font-bold text-lg text-gray-900">Afropreunariat</span>
|
||||
<span className="font-serif font-bold text-lg text-gray-900">Afrohub</span>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="flex-1 flex flex-col overflow-y-auto pt-5 pb-4">
|
||||
@@ -297,7 +300,7 @@ const DashboardContent = () => {
|
||||
{currentView === 'messages' && <DashboardMessages onMessagesRead={fetchUnreadCount} initialConversationId={chatId} />}
|
||||
{currentView === 'personal-profile' && <DashboardProfileClient />}
|
||||
{currentView === 'profile' && <DashboardProfile business={displayBusiness} setBusiness={setBusiness} />}
|
||||
{currentView === 'offers' && <DashboardOffers businessId={displayBusiness.id} />}
|
||||
{currentView === 'offers' && <DashboardOffers businessId={displayBusiness.id} plan={displayBusiness.plan} />}
|
||||
{currentView === 'subscription' && (
|
||||
<div className="space-y-6">
|
||||
<div className="bg-white shadow rounded-lg p-6 flex justify-between items-center">
|
||||
|
||||
Reference in New Issue
Block a user