diff --git a/frontend/components/global/BlogPost.vue b/frontend/components/global/BlogPost.vue index b6df274..5e87211 100644 --- a/frontend/components/global/BlogPost.vue +++ b/frontend/components/global/BlogPost.vue @@ -2,6 +2,8 @@ // types +import { usePersianTimeAgo } from "~/composables/global/usePersianTimeAgo"; + type Props = { id: number; tag: string; @@ -9,15 +11,22 @@ type Props = { title: string; description: string; variant?: "sm" | "lg"; + category: SubCategory; image: string, } // props -withDefaults(defineProps(), { +const props = withDefaults(defineProps(), { variant: "lg" }); +const { date } = toRefs(props); + +// state + +const createdAt = usePersianTimeAgo(new Date(date.value)); +