This commit is contained in:
2026-06-21 15:28:15 +02:00
parent 6dd2cc7d96
commit 9d11616ec7
4 changed files with 100 additions and 8 deletions
@@ -4,6 +4,15 @@ import { useHomePageContext } from '../../composables/useHomePage'
import PriceChart from '../../components/PriceChart.vue'
import DesktopHomeSection from './DesktopHomeSection.vue'
const props = withDefaults(
defineProps<{
embedded?: boolean
}>(),
{
embedded: false,
},
)
const ctx = useHomePageContext()
const chartLayout = computed(() => (toValue(ctx.isBoursecuHomeLayout) ? 'boursecu' : 'default'))
@@ -13,7 +22,11 @@ const selectedChartMetal = computed(() => toValue(ctx.selectedChartMetal))
</script>
<template>
<DesktopHomeSection title="نمودار قیمت" class="dhome-chart">
<component
:is="props.embedded ? 'div' : DesktopHomeSection"
:title="props.embedded ? undefined : 'نمودار قیمت'"
class="dhome-chart"
>
<PriceChart
variant="desktop"
:price-chart-series="priceChartSeries"
@@ -23,5 +36,5 @@ const selectedChartMetal = computed(() => toValue(ctx.selectedChartMetal))
@update-data="ctx.updateChartData"
@update:selected-metal="ctx.setChartMetal"
/>
</DesktopHomeSection>
</component>
</template>