'use client'

import { useAuth } from '@/lib/hooks/useAuth'
import { Link } from '@/components/common/Link'

export default function DashboardPage() {
    const { user } = useAuth()

    return (
        <div className="space-y-6">
            <div className="bg-white shadow rounded-lg p-6">
                <h1 className="text-2xl font-bold text-gray-900">
                    Welcome back, {user?.display_name || user?.email?.split('@')[0] || 'Friend'}!
                </h1>
                <p className="mt-2 text-gray-600">
                    We're glad you're here. This is your personal space to connect, learn, and grow.
                </p>
            </div>

            <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                {/* Quick Links */}
                <div className="bg-white shadow rounded-lg p-6">
                    <h2 className="text-lg font-medium text-gray-900 mb-4">Community</h2>
                    <p className="text-gray-600 mb-4">
                        Join the conversation in our forums. Connect with others who understand your journey.
                    </p>
                    <Link href="https://forum.morethanadiagnosis.org" variant="primary">
                        Go to Forum
                    </Link>
                </div>

                <div className="bg-white shadow rounded-lg p-6">
                    <h2 className="text-lg font-medium text-gray-900 mb-4">Resources</h2>
                    <p className="text-gray-600 mb-4">
                        Explore our curated collection of resources to support you.
                    </p>
                    <Link href="/resources" variant="primary">
                        Browse Resources
                    </Link>
                </div>

                <div className="bg-white shadow rounded-lg p-6">
                    <h2 className="text-lg font-medium text-gray-900 mb-4">The Journal</h2>
                    <p className="text-gray-600 mb-4">
                        Read the latest stories and insights from our community blog.
                    </p>
                    <Link href="/thejournal" variant="primary">
                        Read Blog
                    </Link>
                </div>
            </div>
        </div>
    )
}
