mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-23 00:15:02 +01:00
Import Sentry
This commit is contained in:
@@ -26,9 +26,13 @@ import {InfoData} from "../../@types/types";
|
||||
export default defineComponent({
|
||||
name: "AboutPreview",
|
||||
setup() {
|
||||
const {$content} = useContext()
|
||||
const {$content, $sentry} = useContext()
|
||||
const info = useAsync(() => {
|
||||
return $content('infos').fetch<InfoData>()
|
||||
return $content('infos')
|
||||
.fetch<InfoData>()
|
||||
.catch((error) => {
|
||||
$sentry.captureEvent(error)
|
||||
})
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
@@ -76,7 +76,7 @@ export default defineComponent({
|
||||
const error = ref(false)
|
||||
const success = ref(false)
|
||||
|
||||
const {$axios} = useContext()
|
||||
const {$axios, $sentry} = useContext()
|
||||
const form = ref<Form>({} as Form)
|
||||
const handleForm = async () => {
|
||||
const {data} = await $axios.post('form',
|
||||
@@ -97,6 +97,7 @@ export default defineComponent({
|
||||
form.value = {} as Form
|
||||
}, 5000)
|
||||
} else {
|
||||
$sentry.captureEvent(data)
|
||||
error.value = true
|
||||
setTimeout(() => {
|
||||
error.value = false
|
||||
|
||||
@@ -24,12 +24,15 @@ import {Experience} from "../../@types/types";
|
||||
export default defineComponent({
|
||||
name: "ExperiencesAbout",
|
||||
setup() {
|
||||
const {$content} = useContext()
|
||||
const {$content, $sentry} = useContext()
|
||||
|
||||
const experiences = useAsync(() => {
|
||||
return $content('experiences')
|
||||
.sortBy('end_date', 'desc')
|
||||
.fetch<Experience>()
|
||||
.catch((error) => {
|
||||
$sentry.captureEvent(error)
|
||||
})
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
@@ -24,12 +24,15 @@ import {Formation} from "../../@types/types";
|
||||
export default defineComponent({
|
||||
name: "FormationsHome",
|
||||
setup() {
|
||||
const {$content} = useContext()
|
||||
const {$content, $sentry} = useContext()
|
||||
|
||||
const formations = useAsync(() => {
|
||||
return $content('formations')
|
||||
.sortBy('end_date', 'desc')
|
||||
.fetch<Formation>()
|
||||
.catch((error) => {
|
||||
$sentry.captureEvent(error)
|
||||
})
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
@@ -36,13 +36,16 @@ import {Post} from "../../@types/types";
|
||||
export default defineComponent({
|
||||
name: "PostsHome",
|
||||
setup() {
|
||||
const { $content, i18n } = useContext()
|
||||
const { $content, i18n, $sentry } = useContext()
|
||||
|
||||
const posts = useAsync(() => {
|
||||
return $content(`articles/${i18n.locale}`)
|
||||
.sortBy('date', 'asc')
|
||||
.limit(3)
|
||||
.fetch<Post>()
|
||||
.catch((error) => {
|
||||
$sentry.captureEvent(error)
|
||||
})
|
||||
}, 'posts')
|
||||
|
||||
return {
|
||||
|
||||
@@ -34,12 +34,15 @@ import {Project} from "../../@types/types";
|
||||
export default defineComponent({
|
||||
name: "ProjectsHome",
|
||||
setup() {
|
||||
const { $content } = useContext()
|
||||
const { $content, $sentry } = useContext()
|
||||
|
||||
const projects = useAsync(() => {
|
||||
return $content(`projects`)
|
||||
.limit(3)
|
||||
.fetch<Project>()
|
||||
.catch((error) => {
|
||||
$sentry.captureEvent(error)
|
||||
})
|
||||
}, 'projects')
|
||||
|
||||
return {
|
||||
|
||||
@@ -25,10 +25,14 @@ import {Skill} from "../../@types/types";
|
||||
export default defineComponent({
|
||||
name: "SkillsAbout",
|
||||
setup() {
|
||||
const {$content} = useContext()
|
||||
const {$content, $sentry} = useContext()
|
||||
|
||||
const skills = useAsync(() => {
|
||||
return $content('skills').fetch<Skill>()
|
||||
return $content('skills')
|
||||
.fetch<Skill>()
|
||||
.catch((error) => {
|
||||
$sentry.captureEvent(error)
|
||||
})
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user