diff --git a/postcss.config.mjs b/postcss.config.mjs index a7f73a2..297374d 100644 --- a/postcss.config.mjs +++ b/postcss.config.mjs @@ -1,5 +1,7 @@ -export default { +const config = { plugins: { '@tailwindcss/postcss': {}, }, -} +}; + +export default config; diff --git a/src/app/auth/page.tsx b/src/app/auth/page.tsx index f1fc428..b4edba1 100644 --- a/src/app/auth/page.tsx +++ b/src/app/auth/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useEffect } from 'react'; +import { useState, useEffect, Suspense } from 'react'; import Link from 'next/link'; import { useRouter, useSearchParams } from 'next/navigation'; import { motion, AnimatePresence } from 'framer-motion'; @@ -17,7 +17,7 @@ import { sendVerificationCode, resetPassword } from '@/lib/api'; // - TLD:至少 2 位字母 const EMAIL_REGEX = /^(?!.*\.\.)[a-zA-Z0-9._%+-]+(? ({ ...prev, email: data.message || '发送验证码失败' })); errorManager.showError(data.message || '发送验证码失败'); } - } catch (error) { + } catch { setErrors(prev => ({ ...prev, email: '发送验证码失败,请稍后重试' })); errorManager.showError('发送验证码失败,请稍后重试'); } finally { @@ -958,4 +958,12 @@ export default function AuthPage() { ); +} + +export default function AuthPage() { + return ( + Loading...}> + + + ); } \ No newline at end of file diff --git a/src/app/page.tsx b/src/app/page.tsx index 72fc120..0eec085 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -12,6 +12,7 @@ import { SparklesIcon, RocketLaunchIcon } from '@heroicons/react/24/outline'; +import { Carrot } from 'lucide-react'; export default function Home() { const { scrollYProgress } = useScroll(); @@ -102,7 +103,7 @@ export default function Home() { >
- CS +
(null); + const [, setSelectedFile] = useState(null); const [editingProfile, setEditingProfile] = useState(null); const [editProfileName, setEditProfileName] = useState(''); const [uploadProgress, setUploadProgress] = useState(0); @@ -106,7 +102,7 @@ export default function ProfilePage() { const [emailCodeCountdown, setEmailCodeCountdown] = useState(0); const [isChangingEmail, setIsChangingEmail] = useState(false); - const { user, isAuthenticated, isLoading: isAuthLoading, logout, updateUser } = useAuth(); + const { isAuthenticated, isLoading: isAuthLoading, logout, updateUser } = useAuth(); // 加载用户数据 useEffect(() => { @@ -252,13 +248,6 @@ export default function ProfilePage() { } }; - const handleFileSelect = (e: React.ChangeEvent) => { - const file = e.target.files?.[0]; - if (file) { - setSelectedFile(file); - } - }; - const handleUploadSkin = async (file: File, data: { name: string; description: string; type: 'SKIN' | 'CAPE'; is_public: boolean; is_slim: boolean }) => { if (!file || !data.name.trim()) { messageManager.warning('请选择皮肤文件并输入皮肤名称', { duration: 3000 }); @@ -721,6 +710,7 @@ export default function ProfilePage() {
{userProfile?.avatar ? ( + /* eslint-disable-next-line @next/next/no-img-element */ {userProfile.username}

- 为角色 "{currentProfile?.name}" 选择皮肤 + 为角色 “{currentProfile?.name}” 选择皮肤