File tree Expand file tree Collapse file tree 3 files changed +2
-9
lines changed Expand file tree Collapse file tree 3 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ interface ScoreboardCardProps {
15
15
score : number ;
16
16
submissions : number ;
17
17
submissionPoints : number ;
18
- totalPoints ?: number ;
19
18
} ;
20
19
index : number ;
21
20
}
Original file line number Diff line number Diff line change @@ -40,15 +40,10 @@ const scoreboardSlice = createSlice({
40
40
initialState,
41
41
reducers : {
42
42
setScoreboardList : ( state , action ) => {
43
- const modifiedList = action . payload ?. map ( ( scoreboard : Scoreboard ) => ( { ...scoreboard , totalPoints : scoreboard ?. submissionPoints + scoreboard ?. feedbackPoints } ) ) ;
44
- // console.log("modifiedList", modifiedList);
45
- state . list = modifiedList ;
43
+ state . list = action . payload ;
46
44
} ,
47
45
setScoreboardFilteredList : ( state , action ) => {
48
- console . log ( "--- set the scoreboard" , action . payload ) ;
49
- const modifiedList = action . payload ?. map ( ( scoreboard : Scoreboard ) => ( { ...scoreboard , totalPoints : scoreboard ?. submissionPoints + scoreboard ?. feedbackPoints } ) ) ;
50
- console . log ( "modifiedList" , modifiedList ) ;
51
- state . list = modifiedList ;
46
+ state . list = action . payload ;
52
47
} ,
53
48
setLoading : ( state , action ) => {
54
49
state . loading = action . payload ;
Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ const scoreboardService = createApi({
53
53
try {
54
54
dispatch ( setLoading ( true ) ) ;
55
55
const { data } = await queryFulfilled ;
56
- console . log ( "data after filter--" , data ) ;
57
56
const sortedList = [ ...data ] ;
58
57
if ( sortBy ) {
59
58
sortedList ?. sort ( ( firstItem , secondItem ) => secondItem [ sortBy ] - firstItem [ sortBy ] ) ;
You can’t perform that action at this time.
0 commit comments