Completion of APIs except for user progress
This commit is contained in:
+7
-2
@@ -284,8 +284,9 @@
|
||||
<p
|
||||
class="py-[2vw] md:py-0 text-[17.72px] md:text-[1.502vw] text-[#383E43] mt-[0.417vw]"
|
||||
>
|
||||
<span v-if="authUser.name">
|
||||
{{authUser?.name}}
|
||||
|
||||
<span v-if="profileName">
|
||||
{{profileName}}
|
||||
</span>
|
||||
|
||||
<span v-else>کاربر</span>
|
||||
@@ -341,10 +342,13 @@
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
const {data, refresh} = await useFetch('/api/auth/me')
|
||||
const profileName = useState('profileName', () => data.value.name)
|
||||
import { useToast } from 'vue-toastification'
|
||||
const toast = useToast()
|
||||
const {authUser} = useAuth();
|
||||
@@ -357,6 +361,7 @@ async function logout(){
|
||||
toast.warning("از حساب کاربری خود خارج شدید")
|
||||
return navigateTo('/')
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user