'use client';
import { useHello, useTRPC } from '@repo/client';
import { useQuery } from '@tanstack/react-query';
import Link from 'next/link';

export default function Home() {
	const trpc = useTRPC();
	const { data, isLoading } = useQuery(trpc.user.getUser.queryOptions());

	return (
		<div className="p-4">
			<h1 className="text-2xl font-bold mb-4">首页</h1>
			<div className="space-y-4">
				<div className="p-4 border rounded">
					<h2 className="text-xl mb-2">功能导航</h2>
					<ul className="space-y-2">
						<li>
							<Link href="/websocket" className="text-blue-500 hover:text-blue-600 hover:underline">
								WebSocket 聊天室
							</Link>
						</li>
						{/* 可以在这里添加更多功能链接 */}
					</ul>
				</div>
			</div>
		</div>
	);
}
