Add hasRating prop for showing ( no comment ) text

This commit is contained in:
marzban-dev
2026-05-26 19:20:42 +03:30
parent b09995920c
commit ccf18fb768
@@ -1,21 +1,23 @@
<script lang="ts" setup> <script lang="ts" setup>
// types // types
type Props = { type Props = {
rate: number rate: number;
} haveRate?: boolean;
};
// props // props
defineProps<Props>(); defineProps<Props>();
</script> </script>
<template> <template>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<span class="typo-p-sm font-normal translate-y-px"> <span class="typo-p-sm font-normal translate-y-px">
{{ rate }} <template v-if="haveRate">
{{ rate }}
</template>
<template v-else> ( بدون نظر ) </template>
</span> </span>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<Icon <Icon