|
@@ -3,14 +3,20 @@
|
|
|
import React, { useState, useEffect, useCallback } from "react";
|
|
|
import { useRouter } from "next/navigation";
|
|
|
import {
|
|
|
- User,
|
|
|
ChevronLeft,
|
|
|
MessageSquare,
|
|
|
ArrowUpCircle,
|
|
|
ArrowDownCircle,
|
|
|
+ Gift,
|
|
|
+ Users,
|
|
|
+ Video,
|
|
|
+ DollarSign,
|
|
|
+ Zap,
|
|
|
} from "lucide-react";
|
|
|
+
|
|
|
import Image from "next/image";
|
|
|
import InfiniteScroll from "react-infinite-scroll-component";
|
|
|
+import Link from "next/link";
|
|
|
|
|
|
const PAGE_SIZE = 10;
|
|
|
|
|
@@ -131,6 +137,11 @@ const PersonalCenter = () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ const handleExchangePoints = () => {
|
|
|
+ console.log("兑换积分");
|
|
|
+ // router.push('/exchange-points');
|
|
|
+ };
|
|
|
+
|
|
|
if (isLoading) {
|
|
|
return (
|
|
|
<div className="bg-blue-600 text-white min-h-screen p-6">Loading...</div>
|
|
@@ -156,9 +167,8 @@ const PersonalCenter = () => {
|
|
|
<h1 className="text-2xl font-bold ml-4">个人中心</h1>
|
|
|
</div>
|
|
|
|
|
|
- <div className="bg-white text-black rounded-lg p-4 mb-6">
|
|
|
+ {/* <div className="bg-white text-black rounded-lg p-4 mb-6">
|
|
|
<div className="flex items-center">
|
|
|
- {/* <User className="w-12 h-12 text-blue-600 mr-4" /> */}
|
|
|
<Image
|
|
|
src="/images/cluo.webp"
|
|
|
alt="User Avatar"
|
|
@@ -171,6 +181,83 @@ const PersonalCenter = () => {
|
|
|
<p className="text-gray-600">积分: {user.points}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </div> */}
|
|
|
+
|
|
|
+ <div className="bg-white text-black rounded-lg p-4 mb-6">
|
|
|
+ <div className="flex items-center justify-between">
|
|
|
+ <div className="flex items-center">
|
|
|
+ <Image
|
|
|
+ src="/images/cluo.webp"
|
|
|
+ alt="User Avatar"
|
|
|
+ width={50}
|
|
|
+ height={50}
|
|
|
+ className="rounded-full mr-2"
|
|
|
+ />
|
|
|
+ <div>
|
|
|
+ <h2 className="text-xl font-bold">{user.username}</h2>
|
|
|
+ <p className="text-gray-600">积分: {user.points}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <button
|
|
|
+ className="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-2 rounded transition duration-300"
|
|
|
+ onClick={() => handleExchangePoints()}
|
|
|
+ >
|
|
|
+ 兑换积分
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {/* <div className="bg-white text-black rounded-lg p-4 mb-6">
|
|
|
+ <h3 className="text-lg font-bold mb-2">最新活动</h3>
|
|
|
+ <p className="mb-2">🔉最新福利活动</p>
|
|
|
+ <p className="mb-2">🔜加入千人福利群</p>
|
|
|
+ <div className="flex items-center">
|
|
|
+ <MessageSquare className="w-5 h-5 mr-2" />
|
|
|
+ <p>在线客服</p>
|
|
|
+ </div>
|
|
|
+ </div> */}
|
|
|
+
|
|
|
+ <div className="bg-white text-black rounded-lg p-4 mb-6 shadow-md">
|
|
|
+ <h3 className="text-xl font-bold mb-2 text-blue-600">最新活动</h3>
|
|
|
+ <Link
|
|
|
+ href="/betting"
|
|
|
+ className="flex items-center hover:bg-gray-100 p-2 rounded transition duration-300"
|
|
|
+ >
|
|
|
+ {/* <DollarSign className="w-5 h-5 mr-1 text-red-500" /> */}
|
|
|
+ <Zap className="w-5 h-5 mr-1 text-[#FFD700]" />
|
|
|
+ <p className="text-lg">1919智博投注</p>
|
|
|
+ </Link>
|
|
|
+ <Link
|
|
|
+ href="/activity"
|
|
|
+ className="flex items-center hover:bg-gray-100 p-2 rounded transition duration-300"
|
|
|
+ >
|
|
|
+ <Gift className="w-5 h-5 mr-1 text-red-500" />
|
|
|
+ <p className="text-lg">最新福利活动</p>
|
|
|
+ </Link>
|
|
|
+
|
|
|
+ <Link
|
|
|
+ href="/live-stream"
|
|
|
+ className="flex items-center hover:bg-gray-100 p-2 rounded transition duration-300"
|
|
|
+ >
|
|
|
+ <Video className="w-5 h-5 mr-1 text-green-500" />
|
|
|
+ <p className="text-lg">高清直播美女解说</p>
|
|
|
+ </Link>
|
|
|
+
|
|
|
+ <Link
|
|
|
+ href="/join-group"
|
|
|
+ className="flex items-center hover:bg-gray-100 p-2 rounded transition duration-300"
|
|
|
+ >
|
|
|
+ <Users className="w-5 h-5 mr-1 text-purple-500" />
|
|
|
+ <p className="text-lg">加入千人福利群</p>
|
|
|
+ </Link>
|
|
|
+
|
|
|
+ <Link
|
|
|
+ href="/customer-service"
|
|
|
+ className="flex items-center hover:bg-gray-100 p-2 rounded transition duration-300"
|
|
|
+ >
|
|
|
+ <MessageSquare className="w-5 h-5 mr-1 text-blue-500" />
|
|
|
+ <p className="text-lg">在线客服</p>
|
|
|
+ </Link>
|
|
|
</div>
|
|
|
|
|
|
<div className="bg-white text-black rounded-lg p-4 mb-6">
|
|
@@ -188,7 +275,7 @@ const PersonalCenter = () => {
|
|
|
>
|
|
|
{predictions.map((prediction) => (
|
|
|
<div
|
|
|
- key={prediction.id}
|
|
|
+ key={prediction._id}
|
|
|
className="mb-4 border-b border-gray-200 pb-4 hover:bg-gray-50 transition duration-150 ease-in-out"
|
|
|
>
|
|
|
<p className="font-bold text-lg text-blue-700 mb-2">
|
|
@@ -351,16 +438,6 @@ const PersonalCenter = () => {
|
|
|
</InfiniteScroll>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <div className="bg-white text-black rounded-lg p-4">
|
|
|
- <h3 className="text-lg font-bold mb-2">最新活动</h3>
|
|
|
- <p className="mb-2">🔉最新福利活动</p>
|
|
|
- <p className="mb-2">🔜加入千人福利群</p>
|
|
|
- <div className="flex items-center">
|
|
|
- <MessageSquare className="w-5 h-5 mr-2" />
|
|
|
- <p>在线客服</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
);
|
|
|
};
|