diff --git a/src/app/profile/page.tsx b/src/app/profile/page.tsx index 1dc0121..317ab09 100644 --- a/src/app/profile/page.tsx +++ b/src/app/profile/page.tsx @@ -20,13 +20,12 @@ import { } from "lucide-react"; import Card from "@/components/Card"; import Input from "@/components/Input"; -import ProfileHistoryCard from "@/components/ProfileHistoryCard"; import ProfileFavoritesCard from "@/components/ProfileFavoritesCard"; import { useToast } from "@/hooks/useToast"; import { ProfileCardSkeleton, RecordItemSkeleton } from "@/components/Skeleton"; import { getUserId, getCachedProfile, setCachedProfile, setCachedPreferences, logout } from "@/lib/userId"; import { getAvatarBg, AVATARS } from "@/lib/avatars"; -import type { UserProfile, UserPreferences, DecisionRecord, FavoriteRecord } from "@/types"; +import type { UserProfile, UserPreferences, FavoriteRecord } from "@/types"; export default function ProfilePage() { const router = useRouter(); @@ -34,9 +33,7 @@ export default function ProfilePage() { const [profile, setProfile] = useState<(UserProfile & { email?: string; preferences?: UserPreferences; decisionCount?: number }) | null>(null); const [loading, setLoading] = useState(true); - const [history, setHistory] = useState([]); const [favorites, setFavorites] = useState([]); - const [historyLoading, setHistoryLoading] = useState(false); const [favLoading, setFavLoading] = useState(false); const [editingUsername, setEditingUsername] = useState(false); @@ -58,7 +55,6 @@ export default function ProfilePage() { const [emailSaving, setEmailSaving] = useState(false); const [emailMsg, setEmailMsg] = useState(""); - const [showHistory, setShowHistory] = useState(true); const [showFavorites, setShowFavorites] = useState(true); const toast = useToast(); @@ -93,13 +89,6 @@ export default function ProfilePage() { useEffect(() => { if (!userId) return; - setHistoryLoading(true); - fetch(`/api/user/history?userId=${userId}`) - .then((r) => { if (!r.ok) throw new Error(); return r.json(); }) - .then((data) => setHistory(Array.isArray(data) ? data : [])) - .catch(() => {}) - .finally(() => setHistoryLoading(false)); - setFavLoading(true); fetch(`/api/user/favorite?userId=${userId}`) .then((r) => { if (!r.ok) throw new Error(); return r.json(); }) @@ -500,15 +489,6 @@ export default function ProfilePage() { - setShowHistory((v) => !v)} - onEmpty={() => router.push("/blindbox")} - delay={0.2} - /> -