|
@@ -10,19 +10,8 @@ import { Navbar } from '@/components/ui/navbar'
|
|
|
import './index.css'
|
|
import './index.css'
|
|
|
|
|
|
|
|
const ProfilePage: React.FC = () => {
|
|
const ProfilePage: React.FC = () => {
|
|
|
- // const [userProfile, setUserProfile] = useState<UserProfile | null>(null)
|
|
|
|
|
const { user: userProfile, logout, isLoading: loading } = useAuth()
|
|
const { user: userProfile, logout, isLoading: loading } = useAuth()
|
|
|
|
|
|
|
|
- // useEffect(() => {
|
|
|
|
|
- // if (user) {
|
|
|
|
|
- // setUserProfile({
|
|
|
|
|
- // ...user,
|
|
|
|
|
- // avatar: user.avatar || 'https://images.unsplash.com/photo-1494790108755-2616b612b786?w=160&h=160&fit=crop&crop=face',
|
|
|
|
|
- // })
|
|
|
|
|
- // }
|
|
|
|
|
- // setLoading(false)
|
|
|
|
|
- // }, [user])
|
|
|
|
|
-
|
|
|
|
|
const handleLogout = async () => {
|
|
const handleLogout = async () => {
|
|
|
try {
|
|
try {
|
|
|
Taro.showModal({
|
|
Taro.showModal({
|