import { createClient } from '@/lib/supabase/server' import { redirect } from 'next/navigation' import Link from 'next/link' import { LogOut, User, ArrowLeft, Cloud, Globe, Wrench } from 'lucide-react' import { Button } from '@/components/ui/button' async function signOut() { 'use server' const supabase = await createClient() await supabase.auth.signOut() redirect('/') } export default async function DashboardPage() { const supabase = await createClient() const { data: { user } } = await supabase.auth.getUser() if (!user) { redirect('/auth/login') } const userName = user.user_metadata?.full_name || user.email?.split('@')[0] || 'User' return (
{/* Header */}
Cloudrite
{userName}
{/* Main content */}
{/* Welcome section */}
Back to home

Welcome back, {userName}

Your Cloudrite dashboard is coming soon. We're working on exciting features for you.

{/* Service cards */}

Web Development

Manage your websites, view analytics, and request updates.

Coming Soon

Cloud Hosting

Monitor your hosting, check uptime, and manage your servers.

Coming Soon

I.T Support

Submit support tickets and track the status of your requests.

Coming Soon
{/* Account info */}

Account Information

Email {user.email}
Account created {new Date(user.created_at).toLocaleDateString('en-NZ', { day: 'numeric', month: 'long', year: 'numeric' })}
Auth provider {user.app_metadata?.provider || 'Email'}
) }