Completion of APIs except for user progress

This commit is contained in:
HAM!DREZA
2024-06-23 11:23:05 +03:30
parent 607ead8528
commit 46dd3d65a0
17 changed files with 356 additions and 411 deletions
+7 -2
View File
@@ -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>