mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-14 12:14:42 +01:00
Working
This commit is contained in:
4
src/components/AboutHome.vue
Executable file → Normal file
4
src/components/AboutHome.vue
Executable file → Normal file
@@ -21,12 +21,11 @@
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
|
||||
import {InfoData} from "~/types/types";
|
||||
|
||||
export default defineComponent({
|
||||
name: "AboutHome",
|
||||
setup() {
|
||||
const {$axios, $sentry} = useContext()
|
||||
const {$axios, $sentry, app} = useContext()
|
||||
const age = useAsync(async () => {
|
||||
const response = await $axios.get('/api/informations', {
|
||||
headers: {
|
||||
@@ -37,6 +36,7 @@ export default defineComponent({
|
||||
return response.data.informations.age
|
||||
} else {
|
||||
$sentry.captureEvent(response.data)
|
||||
app.error({statusCode: 500})
|
||||
}
|
||||
}, 'infos')
|
||||
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {computed, ref, useAsync, useContext} from "@nuxtjs/composition-api";
|
||||
import {Announce} from "~/types/types";
|
||||
import {computed, useAsync, useContext} from "@nuxtjs/composition-api";
|
||||
|
||||
export default {
|
||||
name: "Announcement",
|
||||
@@ -63,7 +62,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user