summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/my/profile.jsx17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index ca6f4700..c9742a14 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -10,14 +10,25 @@ import IsAuth from '@/lib/auth/components/IsAuth';
import Menu from '@/lib/auth/components/Menu';
import PersonalProfile from '@/lib/auth/components/PersonalProfile';
import { Button, Checkbox, Spinner, Tooltip } from '@chakra-ui/react';
-import { useState } from 'react';
-
+import { useState, useEffect } from 'react';
+import switchAccountProgresApi from '@/lib/auth/api/switchAccountProgresApi.js';
export default function Profile() {
const auth = useAuth();
const [isChecked, setIsChecked] = useState(false);
+ const [isAprove, setIsAprove] = useState(false);
const handleChange = async () => {
setIsChecked(!isChecked);
};
+ useEffect(() => {
+ const loadPromo = async () => {
+ const progresSwitchAccount = await switchAccountProgresApi();
+ if (progresSwitchAccount) {
+ setIsAprove(true);
+ }
+ console.log('progresSwitchAccount', progresSwitchAccount);
+ };
+ loadPromo();
+ }, []);
return (
<IsAuth>
<MobileView>
@@ -35,7 +46,7 @@ export default function Profile() {
<Menu />
</div>
<div className='w-9/12 bg-white border border-gray_r-6 rounded'>
- {!auth?.parentId && (
+ {!auth?.parentId && !isAprove && (
<div className='text-sm p-4 flex items-center'>
<Checkbox
borderColor='gray.600'