fixed faq bugs

This commit is contained in:
HAM!DREZA
2024-07-02 18:19:51 +03:30
parent a8e723ddf0
commit d2f71b6b14
21 changed files with 205 additions and 307 deletions
+3 -3
View File
@@ -283,8 +283,8 @@
<nuxt-link to="/account" v-if="authUser">
<img
v-if="profileImage"
:src="profileImage"
v-if="authUser.avatarMedia"
:src="authUser.avatarMedia"
alt="profile"
class="h-[3.698vw] w-[3.698vw] rounded-full p-[0.521vw]"
/>
@@ -365,9 +365,9 @@
<script setup>
const {data: image} = await useFetch('/api/auth/me')
const profileImage = useState('profileImage', () => image.value?.avatarMedia)
const { authUser } = useAuth();
const showSearchBox = useState("showSearchBox", () => false);
const search = ref(null);
const openSearchBox = () => {
search.value = "";
+4 -3
View File
@@ -285,8 +285,8 @@
class="py-[2vw] md:py-0 text-[17.72px] md:text-[1.502vw] text-[#383E43] mt-[0.417vw]"
>
<span v-if="profileName">
{{profileName}}
<span v-if="authUser.name">
{{authUser.name}}
</span>
<span v-else>کاربر</span>
@@ -348,10 +348,11 @@
<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();
async function logout(){
await useFetch('/api/auth/logout', {
headers : useRequestHeaders(['cookie']),