|
@@ -1,7 +1,7 @@
|
|
|
"use client";
|
|
|
import { FC, PropsWithChildren } from "react";
|
|
|
import { useRouter } from "@/i18n";
|
|
|
-// import ButtonOwn from "@/components/ButtonOwn";
|
|
|
+import clsx from "clsx";
|
|
|
import ItemCom from "./component/ItemCom";
|
|
|
import './page.scss'
|
|
|
import { useGlobalStore } from '@/stores';
|
|
@@ -9,7 +9,7 @@ import {getLogoutApi} from "@/api/user";
|
|
|
|
|
|
interface Props {}
|
|
|
|
|
|
-const Profile: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
+const Profile: FC<PropsWithChildren<Props>> = () => {
|
|
|
const { token, setToken, userInfo, setUserInfo } = useGlobalStore();
|
|
|
|
|
|
const logoutRequest = async () => {
|
|
@@ -26,16 +26,17 @@ const Profile: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
router.push(path)
|
|
|
}
|
|
|
|
|
|
+ const divClassName = clsx('bgImg', token && 'default');
|
|
|
return (
|
|
|
<div className="profile-box">
|
|
|
<div className="userContent">
|
|
|
<div className="userInfo">
|
|
|
<div>
|
|
|
- <div className="bgImg"></div>
|
|
|
+ <div className={divClassName}></div>
|
|
|
{
|
|
|
token && (
|
|
|
<div>
|
|
|
- <span>{userInfo?.user_name || ''}</span>
|
|
|
+ <span>{userInfo?.user_name || '昵称'}</span>
|
|
|
<span className="phone">{userInfo?.user_phone || ''}</span>
|
|
|
</div>
|
|
|
)
|
|
@@ -50,7 +51,7 @@ const Profile: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
token && (
|
|
|
<div className="coin">
|
|
|
<div>
|
|
|
- <span className="iconfont icon-wallet"></span>
|
|
|
+ <span className="iconfont icon-icon-wallet"></span>
|
|
|
<div>
|
|
|
<span> Saldo </span>
|
|
|
<div className="num">
|
|
@@ -62,7 +63,7 @@ const Profile: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
<div>
|
|
|
<span className="iconfont icon-gift2"></span>
|
|
|
<div>
|
|
|
- <span> Bônus </span>
|
|
|
+ <span> Bônus <img className="a" src="/img/a.png" alt="" /></span>
|
|
|
<div className="num">
|
|
|
<span className="uppercase">brl </span>
|
|
|
<span>0.00</span>
|
|
@@ -76,9 +77,7 @@ const Profile: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
|
|
|
<div className="link">
|
|
|
<span onClick={() => goPage('/deposit')}>Depósito</span>
|
|
|
- <span onClick={() => goPage('/withdraw')}>Sacar</span>
|
|
|
- {/* <ButtonOwn active={true}>Depósito</ButtonOwn>
|
|
|
- <ButtonOwn active={true}>Sacar</ButtonOwn> */}
|
|
|
+ <span onClick={() => goPage(token ? '/withdraw' : `/login?redirect=withdraw`)}>Sacar</span>
|
|
|
</div>
|
|
|
|
|
|
<ItemCom />
|