diff --git a/src/pages/players.tsx b/src/pages/players.tsx index 763bd6fe..b83239f4 100644 --- a/src/pages/players.tsx +++ b/src/pages/players.tsx @@ -57,10 +57,10 @@ const playerConfig = { { id: "org.sunbird.player.endpage", ver: 1.1, type: "plugin" }, ], sideMenu: { - showShare: true, + showShare: false, showDownload: true, showExit: true, - showPrint: true, + showPrint: false, showReplay: true, }, }, diff --git a/src/services/PlayerService.tsx b/src/services/PlayerService.tsx index 26066812..2420ed83 100644 --- a/src/services/PlayerService.tsx +++ b/src/services/PlayerService.tsx @@ -11,7 +11,7 @@ export const fetchContent = async (identifier: any) => { `${API_URL}?fields=${FIELDS}&mode=${MODE}&licenseDetails=${LICENSE_DETAILS}` ); console.log("response =====>", response); - return response.data.result.content; + return response?.data?.result?.content; } catch (error) { console.error("Error fetching content:", error); throw error; @@ -23,7 +23,7 @@ export const getHierarchy = async (identifier: any) => { const API_URL = `${process.env.NEXT_PUBLIC_WORKSPACE_BASE_URL}${URL_CONFIG.API.HIERARCHY_API}${identifier}`; const response = await axios.get(API_URL); console.log("response =====>", response); - return response.data.result; + return response?.data?.result?.content || response?.data?.result; } catch (error) { console.error("Error fetching content:", error); throw error; @@ -36,7 +36,7 @@ export const getQumlData = async (identifier: any) => { const FIELDS = URL_CONFIG.PARAMS.HIERARCHY_FEILDS; const response = await axios.get(`${API_URL}?fields=${FIELDS}`); console.log("response =====>", response); - return response.data.result; + return response?.data?.result?.content || response?.data?.result; } catch (error) { console.error("Error fetching content:", error); throw error;