Les pénalités ne se suivent pas d'une tentative à une autre

This commit is contained in:
2024-12-14 13:35:09 +01:00
parent 979362d012
commit cb1222d9cf
3 changed files with 7 additions and 1 deletions

View File

@ -9,6 +9,7 @@ export interface ChallengeAction {
end: number | null, // date
penaltyStart: number | null, // date
penaltyEnd: number | null, // date
runId: number,
}
export interface ActionsState {
@ -28,6 +29,7 @@ export interface ChallengeActionPayload {
end: string | null,
penaltyStart: string | null,
penaltyEnd: string | null,
runId: number,
}
export interface ChallengeActionsPayload {
@ -51,6 +53,7 @@ export const challengeActionsSlice = createSlice({
end: dlChallenge.action.end ? new Date(dlChallenge.action.end).getTime() : null,
penaltyStart: dlChallenge.action.penaltyStart ? new Date(dlChallenge.action.penaltyStart).getTime() : null,
penaltyEnd: dlChallenge.action.penaltyEnd ? new Date(dlChallenge.action.penaltyEnd).getTime() : null,
runId: dlChallenge.action.runId,
})
}
state.challengeActions.sort((c1, c2) => c2.id - c1.id)