fix: dashboard

This commit is contained in:
DeathKaioken 2026-01-18 17:37:31 +01:00
parent b9b253ac95
commit 8da784d06b
2 changed files with 3 additions and 112 deletions

View File

@ -15,10 +15,10 @@ module.exports = {
NODE_ENV: 'production',
PORT: '3000',
// inlined from .env
// inlined env (keep in sync with .env used during `npm run build`)
NEXT_PUBLIC_API_BASE_URL: 'https://api.profit-planet.partners',
NEXT_PUBLIC_MODE: 'development',
NEXT_PUBLIC_I18N_DEBUG_MODE: 'true',
NEXT_PUBLIC_MODE: 'production',
NEXT_PUBLIC_I18N_DEBUG_MODE: 'false',
NEXT_PUBLIC_GEO_FALLBACK_COUNTRY: 'false',
NEXT_PUBLIC_SHOW_SHOP: 'false',

View File

@ -12,7 +12,6 @@ import {
UsersIcon,
UserCircleIcon,
StarIcon,
HeartIcon,
LinkIcon
} from '@heroicons/react/24/outline'
@ -145,37 +144,6 @@ export default function DashboardPage() {
}
]
// New: Latest news/articles (replace stats)
const news = [
{
id: 'n1',
title: 'Profit Planet launches Referral Management',
excerpt: 'Create, track, and manage your referral links with realtime usage and status.',
date: '2025-01-08',
category: 'Product Update',
href: '/news/referral-management',
image: null as string | null,
},
{
id: 'n2',
title: 'Tips to maximize referral conversions',
excerpt: 'Learn 7 quick optimizations to improve referral performance and user onboarding.',
date: '2025-01-05',
category: 'Guides',
href: '/news/maximize-referrals',
image: null,
},
{
id: 'n3',
title: 'Community spotlight: January',
excerpt: 'A look at the most inspiring community stories and achievements of the month.',
date: '2025-01-02',
category: 'Community',
href: '/news/community-spotlight-jan',
image: null,
},
]
const content = (
<div className="relative z-10 flex-1 min-h-0">
<PageLayout className="bg-transparent text-gray-900">
@ -192,44 +160,6 @@ export default function DashboardPage() {
</p>
</div>
{/* News Section (replaces Account setup + Stats Grid) */}
<div className="mb-10">
<h2 className="text-xl font-semibold text-gray-900 mb-4">Latest News & Articles</h2>
<div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
{news.map(item => (
<article key={item.id} className="group relative overflow-hidden rounded-xl bg-white border border-gray-200 shadow-sm hover:shadow-md transition-shadow">
{/* Image/placeholder */}
<div className="aspect-[16/9] w-full bg-gradient-to-br from-gray-100 to-gray-200" />
<div className="p-5">
<div className="mb-2 flex items-center gap-2">
<span className="inline-flex items-center rounded-full bg-amber-50 px-2 py-0.5 text-xs font-medium text-amber-700 ring-1 ring-amber-200">
{item.category}
</span>
<span className="text-xs text-gray-500">{new Date(item.date).toLocaleDateString()}</span>
</div>
<h3 className="text-base font-semibold text-gray-900 group-hover:text-[#8D6B1D] transition-colors">
<button
onClick={() => (window.location.href = item.href)}
className="text-left w-full"
>
{item.title}
</button>
</h3>
<p className="mt-2 text-sm text-gray-600 line-clamp-3">{item.excerpt}</p>
<div className="mt-4">
<button
onClick={() => (window.location.href = item.href)}
className="text-sm font-medium text-[#8D6B1D] hover:text-[#7A5E1A]"
>
Read more
</button>
</div>
</div>
</article>
))}
</div>
</div>
{/* Quick Actions */}
<div className="mb-8">
<h2 className="text-xl font-semibold text-gray-900 mb-4">Quick Actions</h2>
@ -301,45 +231,6 @@ export default function DashboardPage() {
</div>
</div>
</div>
{/* Recent Activity */}
<div className="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
<h2 className="text-xl font-semibold text-gray-900 mb-4">Recent Activity</h2>
<div className="space-y-4">
<div className="flex items-center py-3 border-b border-gray-100 last:border-b-0">
<div className="bg-green-100 rounded-full p-2">
<ShoppingBagIcon className="h-5 w-5 text-green-600" />
</div>
<div className="ml-4 flex-1">
<p className="text-sm font-medium text-gray-900">Order completed</p>
<p className="text-sm text-gray-600">Eco-friendly water bottle</p>
</div>
<span className="text-sm text-gray-500">2 days ago</span>
</div>
<div className="flex items-center py-3 border-b border-gray-100 last:border-b-0">
<div className="bg-blue-100 rounded-full p-2">
<HeartIcon className="h-5 w-5 text-blue-600" />
</div>
<div className="ml-4 flex-1">
<p className="text-sm font-medium text-gray-900">Added to favorites</p>
<p className="text-sm text-gray-600">Sustainable backpack</p>
</div>
<span className="text-sm text-gray-500">1 week ago</span>
</div>
<div className="flex items-center py-3">
<div className="bg-purple-100 rounded-full p-2">
<UsersIcon className="h-5 w-5 text-purple-600" />
</div>
<div className="ml-4 flex-1">
<p className="text-sm font-medium text-gray-900">Joined community</p>
<p className="text-sm text-gray-600">Eco Warriors Group</p>
</div>
<span className="text-sm text-gray-500">2 weeks ago</span>
</div>
</div>
</div>
</div>
</div>
</main>