fix. CardNews 하이드레이션 수정

This commit is contained in:
clkim
2025-11-27 14:30:30 +09:00
parent 33bd842020
commit 56ff6e66d7

View File

@@ -2,7 +2,7 @@
interface Props {
title: string
description: string | number
imgPath: string
imgPath: string | null
linkTarget?: '_blank' | '_self'
url?: string
alt?: string
@@ -13,6 +13,9 @@ const props = defineProps<Props>()
const { locale } = useI18n()
const { sendLog, useAnalyticsLogDataDirect } = useAnalytics()
const isNoImage = computed(() => {
return !props.imgPath || props.imgPath === null
})
const isShowOverlay = computed(() => {
return props.title || props.description
})
@@ -30,7 +33,7 @@ const handleLinkClick = (title: string) => {
</script>
<template>
<div :class="['card-news', { 'no-image': !props.imgPath }, props.class]">
<div :class="['card-news', { 'no-image': isNoImage }, props.class]">
<img
v-if="props.imgPath"
:src="props.imgPath"