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AKf,KAAK+C,cAAyBhC,EAAKf,KAAK+C,cAAc/C,KAAKgD,UAAY,GAAIY,IAAK7C,EAAKf,KAAK+C,cAAgBhC,EAAKf,KAAK+C,cAAc/C,KAAKwF,QAAU,KACpL,MAGV5D,EAAAA,cAAA,UAAKb,EAAKf,KAAKR,kBAAkBsG,YACjClE,EAAAA,cAAA,SAAIb,EAAKf,KAAKR,kBAAkBuG,SAEF,UAA1B1G,EAAYqC,OAAOC,GACnBC,EAAAA,cAACoE,EAAAA,GAAI,CAACC,GAAIlF,EAAKf,KAAKiB,iBAAkBuC,UAAU,YAAW,aAC/B,OAA1BnE,EAAYqC,OAAOC,GACrBC,EAAAA,cAACoE,EAAAA,GAAI,CAACC,GAAIlF,EAAKf,KAAKiB,iBAAkBuC,UAAU,YAAW,eAE3D5B,EAAAA,cAACoE,EAAAA,GAAI,CAACC,GAAIlF,EAAKf,KAAKiB,iBAAkBuC,UAAU,YAAW,mBAOnF5B,EAAAA,cAAA,OAAK4B,UAAU,YACX5B,EAAAA,cAAA,OAAK4B,UAAU,gBAEmB,UAA1BnE,EAAYqC,OAAOC,GACfC,EAAAA,cAAA,SAAG,uBAAoBA,EAAAA,cAACoE,EAAAA,GAAI,CAACC,GAAG,qCAAoC,cAAkB,sEAAkErE,EAAAA,cAACoE,EAAAA,GAAI,CAACC,GAAG,iCAAgC,iBACrK,OAA1B5G,EAAYqC,OAAOC,GACrBC,EAAAA,cAAA,SAAG,oEAAiEA,EAAAA,cAACoE,EAAAA,GAAI,CAACC,GAAG,uBAAsB,gBAAmB,+GACpHrE,EAAAA,cAAA,SAAG,uBAAoBA,EAAAA,cAACoE,EAAAA,GAAI,CAACC,GAAG,qCAAoC,cAAkB,sEAAkErE,EAAAA,cAACoE,EAAAA,GAAI,CAACC,GAAG,iCAAgC,uBAQtN,C","sources":["webpack://jameel-health-prj/./src/templates/perspective.js"],"sourcesContent":["// import {Helmet} from \"react-helmet\";\nimport React, {useEffect, useState} from \"react\";\nimport Layout from '../components/layouts/index';\n// import MainMenu from '../components/Mainmenu';\n// import CustomPost from '../components/customPostItems';\nimport {graphql, Link} from \"gatsby\";\n// import styled from 'styled-components';\n// import SEO from \"../components/seo\";\nimport Function from \"../lib/functions\";\nimport $ from 'jquery';\nimport SharePrint from '../common/images/share-print.png';\nimport ShareMail from '../common/images/share-mail.png';\nimport ShareTwitter from '../common/images/share-twitter.png';\nimport ShareWhatsapp from '../common/images/share-whatsapp.png';\nimport ShareLinkedin from '../common/images/share-linkedin.png';\nimport ShareFb from '../common/images/share-fb.png';\nimport ShareCopy from '../common/images/share-copy.png';\nimport BreadcrumbSchema from \"../components/BreadcrumbSchema\";\nimport {\n EmailShareButton,\n FacebookShareButton,\n LinkedinShareButton,\n TwitterShareButton,\n WhatsappShareButton,\n // PinterestShareButton\n} from \"react-share\";\nimport {CopyToClipboard} from 'react-copy-to-clipboard';\n// import {GatsbySeo} from 'gatsby-plugin-next-seo';\nimport {decode} from 'html-entities';\n\n\nconst Perspective = (props) => { \n const [shareUrl,\n setShareUrl] = useState('')\n useEffect(() => handleComponentMounted(), []);\n useEffect(() => handleComponentUpdated());\n const handleComponentMounted = () => {\n if (typeof window !== 'undefined') {\n const getUrl = window.location.href \n console.log('getUrl', getUrl)\n setShareUrl(getUrl)\n setTimeout(() => {\n $('.pagescrollbar').show();\n $('h1.wow').removeClass('wow');\n }, 3000);\n }\n }\n const handleComponentUpdated = () => {\n $('.pagescrollbar').show();\n $('h4.wow').removeClass('wow');\n Function.LoadingAllSliderScript()\n }\n\n const currentPage = props.data.wpPerspective\n const location = currentPage.press_release_acf.location\n let relatedNews;\n\n if (process.env.GATSBY_PREVIEW_MODE === \"true\") {\n relatedNews = props.data.allWpPerspective.edges;\n } else {\n relatedNews = props.data.allWpPerspective.edges.filter(news => news.node.publishStatus.status !== 'private')\n }\n // const relatedNews = props.data.allWpPerspective.edges;\n // let seoImg = currentPage.featuredImage && currentPage.featuredImage.node ? currentPage.featuredImage.node.localFile.name + \"-150x150\" + currentPage.featuredImage.node.localFile.ext : null;\n // let seoImgUrl = seoImg ? currentPage.featuredImage.node.sourceUrl.replace(currentPage.featuredImage.node.localFile.base, seoImg) : '';\n const clickHandler = (e) => {}\n const _copyUrl = () => {\n document.getElementById(\"linkcopiedStories\").classList.add(\"on\");\n setTimeout(function () {\n document.getElementById(\"linkcopiedStories\").classList.remove(\"on\");\n }, 3000);\n }\n\n\n //New code\n\n const link = currentPage.link // Original link\n const validTranslated = currentPage.translated.find(item => item.publishStatus.status !== 'private');\n console.log(validTranslated,\"validTranslated\");\n const translatedLink = validTranslated ? validTranslated.localizedWpmlUrl : null;\n // const translatedLink = currentPage.translated.length && currentPage.translated[0].localizedWpmlUrl ? currentPage.translated[0].localizedWpmlUrl : null;\n const segments = link.split('/'); // Split the link by slashes\n console.log(translatedLink,\"test insights link\")\n \n let modifiedLink;\n let translatedmodifiedLink;\n let translatedsegments;\n if(translatedLink == null){\n modifiedLink = segments.filter(segment => segment !== 'home').join('/');\n console.log(modifiedLink,\"modifiedLinkmodifiedLink\")\n }else{\n translatedsegments = translatedLink.split('/'); \n modifiedLink = segments.filter(segment => segment !== 'home').join('/'); // Remove \"home\" and join the segments\n translatedmodifiedLink = translatedsegments.filter(segment => segment !== 'home').join('/');\n }\n\n console.log(translatedmodifiedLink,\"test insights link\")\n\n\n const contactpagelink = currentPage.locale.id === 'en_US' ? 'en' : currentPage.locale.id === 'ar' ? 'ar' : 'tr'\n return (\n \n ]+)>)/gi, \"\")} \n \n seosection={{\n seotitle: currentPage.seo.opengraphTitle\n ? currentPage.seo.opengraphTitle\n : decode(currentPage.title).replace(/(<([^>]+)>)/gi, \"\"),\n seodescription: currentPage.seo.opengraphDescription\n ? currentPage.seo.opengraphDescription\n : \"\",\n openGraphURL: shareUrl,\n openGraphtitle: decode(currentPage.title).replace(\n /(<([^>]+)>)/gi,\n \"\"\n ),\n openGraphdescription: \"\",\n openGraphImage: currentPage.featuredImage.node.sourceUrl,\n ogType:\"article\",\n articleSection: currentPage.locale.id ===\"ar\" ? \"أفكار\": \"Insights\"\n }}\n \n >\n\n\n {/* ]+)>)/gi, \"\"),\n description: currentPage.press_release_acf.summary,\n images: [\n {\n url: seoImgUrl,\n }\n ],\n site_name: 'Jameel Health',\n }}\n /> */}\n
\n
\n
\n
\n

\n
\n
\"img\" {currentPage.date} | {location}
\n
\n window.print()} href=\"#\" className=\"printbtn\">\"img\"\n e.preventDefault()} subject={currentPage.title} url={'https://aljhealth.com/'}>\n \"img\"\n \n\n \n _copyUrl()} onKeyDown={() => _copyUrl()} role=\"presentation\" style={{ margin: 10 }} src={ShareCopy} alt=\"img\" />\n \n\n \n \"img\"\n \n \n \"img\"\n \n \n \"img\"\n \n \n \"img\"\n \n
Link Copied!
\n
\n
\n
\n {currentPage.featuredImage && currentPage.featuredImage.node && currentPage.featuredImage.node.sourceUrl ?\n {currentPage.featuredImage\n : null}\n {/* {currentPage.featuredImage */}\n {currentPage.featuredImage && currentPage.featuredImage.node && currentPage.featuredImage.node.caption ? : null}\n
\n
\n
\n\n
\n {\n currentPage.locale.id === \"en_US\" ?\n

Related Articles

\n : currentPage.locale.id === \"ar\" ?\n

مقالات ذات صلة

\n :

Related Articles

\n }\n\n
\n {relatedNews.map((item, i) =>\n
\n \n {item.node.featuredImage.node.sourceUrl ?\n {item.node.featuredImage\n : null}\n {/* {item.node.featuredImage */}\n \n

{item.node.press_release_acf.shortTitle}

\n

{item.node.press_release_acf.summary}

\n {\n currentPage.locale.id === \"en_US\" ?\n Read more\n : currentPage.locale.id === \"ar\" ?\n إقرأ المزيد\n :\n Read more\n }\n
\n )}\n
\n
\n

\n
\n
\n {\n currentPage.locale.id === \"en_US\" ?\n

For press inquiries click here, or call +971 4 448 0906 (GMT +4 hours UAE). For public inquiries click here.

\n : currentPage.locale.id === \"ar\" ?\n

للاتصالات الإعلامية، والاستفسارات الصحفية، يرجى التواصل معنا على media@alj.ae، أو الاتصال بنا على رقم 0906 448 4 971+ (توقيت الإمارات العربية المتحدة يسبق توقيت غرينتش بمقدار 4 ساعات)

\n :

For press inquiries click here, or call +971 4 448 0906 (GMT +4 hours UAE). For public inquiries click here.

\n }\n
\n
\n
\n
\n
\n
\n
\n )\n}\n\nexport default Perspective\n\nexport const pageQuery = graphql `\n query currentPageQueryallWpPerspective2($id: String!, $lang: ID!) {\n wpPerspective(id: { eq: $id }) {\n title\n content\n slug\n date(formatString: \"MMMM D, Y\")\n id\n locale {\n id\n locale\n }\n link\n translated {\n id\n localizedWpmlUrl\n locale {\n id\n locale\n }\n publishStatus{\n status\n }\n slug\n title\n }\n featuredImage {\n node {\n altText\n sourceUrl\n caption\n localFile {\n name\n ext\n base\n }\n }\n }\n seo {\n opengraphTitle\n opengraphDescription\n }\n press_release_acf {\n location\n summary\n } \n }\n \n ContactEn: wpPage(databaseId: {eq: 975}) {\n content\n }\n ContactAr: wpPage(databaseId: {eq: 1793}) {\n content\n }\n\n allWpPerspective(filter: {locale: {id: {eq: $lang}},id: {ne: $id}}, limit: 6, sort: {fields: date, order: DESC}) {\n edges {\n node {\n id\n title\n localizedWpmlUrl\n publishStatus{\n status\n }\n featuredImage {\n node {\n altText\n sourceUrl\n }\n }\n press_release_acf {\n summary\n shortTitle\n }\n }\n }\n }\n }\n`\n"],"names":["props","shareUrl","setShareUrl","useState","useEffect","handleComponentMounted","handleComponentUpdated","window","getUrl","location","href","setTimeout","$","show","removeClass","Function","currentPage","data","wpPerspective","press_release_acf","relatedNews","process","GATSBY_PREVIEW_MODE","allWpPerspective","edges","filter","news","node","publishStatus","status","clickHandler","e","_copyUrl","document","getElementById","classList","add","remove","link","validTranslated","translated","find","item","translatedLink","localizedWpmlUrl","segments","split","modifiedLink","translatedmodifiedLink","translatedsegments","segment","join","contactpagelink","locale","id","React","Layout","translations","lang","translateURL","langURL","seosection","seotitle","seo","opengraphTitle","decode","title","replace","seodescription","opengraphDescription","openGraphURL","openGraphtitle","openGraphdescription","openGraphImage","featuredImage","sourceUrl","ogType","articleSection","BreadcrumbSchema","PageTitle","defaultPageName","pageUrl","langUrl","className","dangerouslySetInnerHTML","__html","src","alt","date","rel","onClick","print","SharePrint","EmailShareButton","openShareDialogOnClick","preventDefault","subject","url","style","margin","ShareMail","CopyToClipboard","text","onKeyDown","role","ShareCopy","WhatsappShareButton","ShareWhatsapp","LinkedinShareButton","ShareLinkedin","FacebookShareButton","quote","ShareFb","TwitterShareButton","ShareTwitter","altText","caption","content","map","i","key","shortTitle","summary","Link","to"],"sourceRoot":""}