存了
This commit is contained in:
@@ -10,7 +10,7 @@ import { getFullBookPrice, getTotalSectionCount } from "@/lib/book-data"
|
||||
|
||||
export default function MyPage() {
|
||||
const router = useRouter()
|
||||
const { user, isLoggedIn, logout, getAllPurchases, settings, updateUser } = useStore()
|
||||
const { user, isLoggedIn, logout, getAllPurchases, settings, updateUser, refreshUserProfile } = useStore()
|
||||
const [showAuthModal, setShowAuthModal] = useState(false)
|
||||
const [mounted, setMounted] = useState(false)
|
||||
const [activeTab, setActiveTab] = useState<"overview" | "footprint">("overview")
|
||||
@@ -46,6 +46,13 @@ export default function MyPage() {
|
||||
loadConfig()
|
||||
}, [])
|
||||
|
||||
// 每次进入「我的」页都刷新可提现金额等用户资料
|
||||
useEffect(() => {
|
||||
if (mounted && isLoggedIn && user?.id && refreshUserProfile) {
|
||||
refreshUserProfile()
|
||||
}
|
||||
}, [mounted, isLoggedIn, user?.id])
|
||||
|
||||
// 绑定账号
|
||||
const handleBind = async () => {
|
||||
if (!bindValue.trim()) {
|
||||
|
||||
Reference in New Issue
Block a user