mirror of
https://github.com/ArthurDanjou/artchat.git
synced 2026-02-01 04:29:31 +01:00
Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { useDateFormat } from '#imports'
|
||||
|
||||
const route = useRoute()
|
||||
const { data: project } = await useAsyncData(`projects/${route.params.slug}`, () =>
|
||||
queryCollection('projects').path(`/projects/${route.params.slug}`).first())
|
||||
@@ -17,6 +19,8 @@ useSeoMeta({
|
||||
})
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
useSeoMeta(project.value.seo || {})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { useDateFormat } from '#imports'
|
||||
|
||||
const route = useRoute()
|
||||
const { data: writing } = await useAsyncData(`writings/${route.params.slug}`, () =>
|
||||
queryCollection('writings').path(`/writings/${route.params.slug}`).first())
|
||||
@@ -10,13 +12,9 @@ if (!writing.value) {
|
||||
})
|
||||
}
|
||||
|
||||
useSeoMeta({
|
||||
title: writing.value?.title,
|
||||
description: writing.value?.description,
|
||||
author: 'Arthur Danjou',
|
||||
})
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
useSeoMeta(writing.value.seo || {})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user