Skip to content

Commit b46be61

Browse files
committed
fix: refactor (coderabbit suggestion)
1 parent 567940d commit b46be61

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

app/components/Package/TrendsChart.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,10 @@ function formatXyDataset(
201201
dataset: EvolutionData,
202202
seriesName: string,
203203
): { dataset: VueUiXyDatasetItem[] | null; dates: number[] } {
204-
const baseColor = accent.value
205-
const lightColor = isDarkMode.value && baseColor ? lightenOklch(baseColor, 0.618) : undefined
204+
const lightColor = isDarkMode.value ? lightenOklch(accent.value, 0.618) : undefined
206205
207206
// Subtle path gradient applied in dark mode only
208-
const temperatureColors =
209-
isDarkMode.value && typeof baseColor === 'string' && typeof lightColor === 'string'
210-
? [lightColor, baseColor]
211-
: undefined
207+
const temperatureColors = lightColor ? [lightColor, accent.value] : undefined
212208
213209
const datasetItem: VueUiXyDatasetItem = {
214210
name: seriesName,

0 commit comments

Comments
 (0)