|
@@ -115,9 +115,9 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { useSwipe } from '@vueuse/core'
|
|
|
+import { ApiModules } from '~/repository/api'
|
|
|
import { useSideBar } from '~/store/useSideBar'
|
|
|
import { useUser } from '~/store/useUser'
|
|
|
-import type { UserData } from '~/types/userData'
|
|
|
|
|
|
const store = useSideBar()
|
|
|
const sideBarEl = ref(null)
|
|
@@ -128,7 +128,6 @@ const { direction } = useSwipe(sideBarEl, {
|
|
|
},
|
|
|
})
|
|
|
const user = useUser()
|
|
|
-const api = useApi()
|
|
|
|
|
|
const links = ref<{
|
|
|
name: string
|
|
@@ -175,8 +174,6 @@ const info = ref()
|
|
|
|
|
|
onMounted(
|
|
|
async () =>
|
|
|
- (info.value = await api.get<UserData>(
|
|
|
- `/user/info?access_token=${user.data.access_token}`,
|
|
|
- )),
|
|
|
+ (info.value = await ApiModules.user.getInfo(user.$state.data.access_token)),
|
|
|
)
|
|
|
</script>
|