fix: eraser not resetting features

This commit is contained in:
Julien Calixte
2024-12-31 10:14:00 +01:00
parent 474b5bfaab
commit 76540f5a5a
5 changed files with 24 additions and 32 deletions

View File

@@ -1,3 +1,4 @@
import { newsAppFeatures } from '@/data/app-feature'
import type {
Feature,
FeatureStatus
@@ -74,7 +75,8 @@ const mayBeInProgress = ({
}
export const newBacklog = (type: 'bird' | 'mobile-app', limit?: number) => {
const initialFeatures = type === 'bird' ? birdFeatures : mobileAppFeatures
const initialFeatures =
type === 'bird' ? [...birdFeatures] : [...mobileAppFeatures]
return limit !== undefined
? popNElement(shuffleArray(initialFeatures), limit)
: shuffleArray(initialFeatures)