fix: design
This commit is contained in:
@@ -223,9 +223,9 @@ import BoxedIconTitleBlock from '@/components/blocks/BoxedIconTitleBlock.vue'
|
||||
import { useGetCitiesOfProvinceQuery, useGetProvincesQuery } from '@/services/query/common'
|
||||
import {
|
||||
authKeys,
|
||||
useGetProfileQuery,
|
||||
useGetMeQuery,
|
||||
useUpdateProfileMutation,
|
||||
useUploadTemporaryMutation,
|
||||
useUploadMediaMutation,
|
||||
} from '@/services/query/auth'
|
||||
|
||||
const router = useRouter()
|
||||
@@ -291,7 +291,7 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
const { data: profile } = useGetProfileQuery()
|
||||
const { data: profile } = useGetMeQuery()
|
||||
|
||||
watch(profile, (user) => {
|
||||
if (!user) return
|
||||
@@ -315,7 +315,7 @@ watch(profile, (user) => {
|
||||
if (user.avatarUrl) avatar.value = { url: user.avatarUrl }
|
||||
})
|
||||
|
||||
const uploadMutation = useUploadTemporaryMutation()
|
||||
const uploadMutation = useUploadMediaMutation()
|
||||
|
||||
const onAvatarCropped = async (file) => {
|
||||
try {
|
||||
@@ -341,7 +341,7 @@ const onSubmit = async () => {
|
||||
delete payload.passwordConfirmation
|
||||
}
|
||||
await updateMutation.mutateAsync(payload)
|
||||
await queryClient.invalidateQueries({ queryKey: authKeys.profile() })
|
||||
await queryClient.invalidateQueries({ queryKey: authKeys.me() })
|
||||
toast.success('پروفایل با موفقیت بهروز شد')
|
||||
router.push({ name: 'student-dashboard' })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user