File tree Expand file tree Collapse file tree
apps/game_craft/components/features/workshops Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,9 +36,14 @@ export function OfflineWorkshop({
3636 )
3737 . then ( ( response ) => {
3838 if ( response . status === 200 ) {
39+ const filteredData = response . data . data ;
40+ filteredData . results = filteredData . results . filter (
41+ ( presentation ) => presentation . is_active
42+ ) ;
43+
3944 setPresentations ( {
4045 loading : false ,
41- data : response . data . data ,
46+ data : filteredData ,
4247 } ) ;
4348 } else {
4449 setPresentations ( { loading : false , error : "failed to fetch" } ) ;
Original file line number Diff line number Diff line change @@ -40,9 +40,14 @@ export function OnlineWorkshop({
4040 )
4141 . then ( ( response ) => {
4242 if ( response . status === 200 ) {
43+ const filteredData = response . data . data ;
44+ filteredData . results = filteredData . results . filter (
45+ ( presentation ) => presentation . is_active
46+ ) ;
47+
4348 setPresentations ( {
4449 loading : false ,
45- data : response . data . data ,
50+ data : filteredData ,
4651 } ) ;
4752 } else {
4853 setPresentations ( { loading : false , error : "failed to fetch" } ) ;
You can’t perform that action at this time.
0 commit comments