mirror of
https://github.com/web3privacy/explorer-app.git
synced 2024-10-15 16:46:26 +02:00
fix(score): fix score calculation synchronisation with rating being generated
This commit is contained in:
parent
6830e499cd
commit
6f70344af4
1 changed files with 1 additions and 1 deletions
|
@ -60,9 +60,9 @@ export const useData = defineStore('data', () => {
|
|||
features: Feature[]
|
||||
ranks: Rank[]
|
||||
}>('/api/data')
|
||||
data.projects.forEach(project => project.ratings = generateProjectRating(project))
|
||||
projects.value = data.projects.map(project => ({
|
||||
...project,
|
||||
ratings: generateProjectRating(project),
|
||||
percentage: Math.round((project.ratings?.reduce((a, b) => a + b.points, 0) || 0) / 1.5),
|
||||
})).filter(p => p.name)
|
||||
|
||||
|
|
Loading…
Reference in a new issue