@@ -15,7 +15,7 @@ const actions = {
1515export const loadGamesSettings = ( ) => ( dispatch ) => {
1616 dispatch ( requests . getGamesSettings ( {
1717 onSuccess : ( response ) => {
18- const data = response . data ;
18+ const { data } = response ;
1919
2020 if ( data . game_type ) {
2121 dispatch ( actions . game . updateType ( data . game_type ) ) ;
@@ -50,7 +50,6 @@ export const loadGamesSettings = () => (dispatch) => {
5050 }
5151 } ,
5252 onFailure : ( error ) => {
53- console . error ( 'Failed to load game settings:' , error ) ;
5453 dispatch ( actions . requests . failRequest ( {
5554 requestKey : RequestKeys . fetchBlock ,
5655 error,
@@ -72,15 +71,14 @@ export const uploadGameImage = ({ index, imageFile, imageType }) => (dispatch) =
7271 // Extract the URL from the response
7372 // Response format: { success: true, url: "/media/games/...", filename: "..." }
7473 const imageUrl = response . data ?. url ;
75-
74+
7675 if ( imageType === 'term' ) {
7776 dispatch ( actions . game . updateTermImage ( { index, termImage : imageUrl } ) ) ;
7877 } else if ( imageType === 'definition' ) {
7978 dispatch ( actions . game . updateDefinitionImage ( { index, definitionImage : imageUrl } ) ) ;
8079 }
8180 } ,
8281 onFailure : ( error ) => {
83- console . error ( 'Failed to upload game image:' , error ) ;
8482 dispatch ( actions . requests . failRequest ( {
8583 requestKey : RequestKeys . uploadAsset ,
8684 error,
0 commit comments