Skip to content

Commit 25baf03

Browse files
committed
chore: remove dead code from original color implementation
1 parent 5bc8d85 commit 25baf03

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

app/composables/useVersionDistribution.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ import type {
55
VersionGroupDownloads,
66
VersionGroupingMode,
77
} from '#shared/types/version-downloads'
8-
import { useAccentColor } from './useSettings'
98

109
interface ChartDataItem {
1110
name: string
1211
downloads: number
13-
color?: string
1412
}
1513

1614
/**
@@ -23,8 +21,6 @@ interface ChartDataItem {
2321
* @returns Reactive state and computed chart data
2422
*/
2523
export function useVersionDistribution(packageName: MaybeRefOrGetter<string>) {
26-
const { accentColors } = useAccentColor()
27-
2824
const groupingMode = ref<VersionGroupingMode>('major')
2925
const hideSmallVersions = ref(false)
3026
const pending = ref(false)
@@ -111,20 +107,13 @@ export function useVersionDistribution(packageName: MaybeRefOrGetter<string>) {
111107
})
112108
})
113109

114-
const chartColors = computed<string[]>(() => {
115-
return accentColors.value.map(color => color.value)
116-
})
117-
118110
const chartDataset = computed<ChartDataItem[]>(() => {
119111
const groups = filteredGroups.value
120112
if (!groups.length) return []
121113

122-
const colors = chartColors.value
123-
124-
return groups.map((group, index) => ({
114+
return groups.map(group => ({
125115
name: group.label,
126116
downloads: group.downloads,
127-
color: colors[index % colors.length] ?? colors[0],
128117
}))
129118
})
130119

0 commit comments

Comments
 (0)