\n {allNews.map((data, key) => {\n\n if (data.node.id === wpNews.id) {\n const previousData = key - 1;\n\n if (previousData >= 0) {\n\n let content = allNews[previousData].node.content;\n const wordsPerMinute = 200;\n const wordCount = content.split(/\\s+/).length;\n const readingTimeMinutes = Math.ceil(\n wordCount / wordsPerMinute\n );\n\n const prevDateObject = getFormatDate(allNews[previousData].node.press_release_acf.publishedDate);\n const prevDisplayDate = format(prevDateObject, 'MMMM d, yyyy');\n\n var date = prevDisplayDate;\n var arr1 = date.split(' ');\n var arr2 = arr1[1].split(',');\n var arr3 = arr1[2];\n var month = arr1[0];\n\n console.log(arr2,\"arr2\");\n console.log(arr3,\"arr3\");\n console.log(arr1[0],\"arr1\");\n \n // var prevnewsandinsightsdate = translateDate(month,wpNews.locale.id)+' '+arr2[0]+ SiteTrans.comma_article_txt[wpNews.locale.id] +arr3;\n\n if(wpNews.locale.id==\"ar\"){\n var prevnewsandinsightsdate = arr2[0]+' '+translateDate(month,wpNews.locale.id)+SiteTrans.comma_article_txt[wpNews.locale.id]+arr3;\n }else{\n var prevnewsandinsightsdate = translateDate(month,wpNews.locale.id)+' '+arr2[0]+ SiteTrans.comma_article_txt[wpNews.locale.id]+arr3;\n }\n\n return (\n
\n
\n
\n {/*

*/}\n\n
\n\n
\n
\n

\n
\n {SiteTrans.read_txt[wpNews.locale.id]}\n
\n {SiteTrans.previous_txt[wpNews.locale.id]}\n
\n
\n
\n\n
\n {\n allNews[previousData].node.press_release_acf\n .shortTitle\n }\n
\n\n
\n

\n
\n {\n allNews[previousData].node.press_release_acf\n .location\n }\n \n
\n
\n {\n prevnewsandinsightsdate\n }\n \n
\n

\n
\n {readingTimeMinutes} {SiteTrans.minute_read_txt[wpNews.locale.id]}\n \n
\n
\n \n );\n } else {\n\n }\n }\n })}\n
\n {/*

\n

*/}\n
\n
\n
\n\n
\n

\n
\n {wpNews.press_release_acf.location}\n \n
\n
\n {mainnewsandinsightsdate}\n \n
\n

\n
\n {readingTimeMinutes} {SiteTrans.minute_read_txt[wpNews.locale.id]}\n \n
\n

\n
\n
\n\n
\n {allNews.map((data, key) => {\n if (data.node.id === wpNews.id) {\n const previousData = key - 1;\n const nextData = key + 1;\n const totalItems = allNews.length;\n\n \n return (\n
\n {previousData >= 0 &&
\n

\n
{SiteTrans.previous_txt[wpNews.locale.id]}
\n

\n }\n {nextData <= totalItems - 1 &&
\n

\n
{SiteTrans.next_txt[wpNews.locale.id]}
\n

\n }\n
\n );\n \n }\n })}\n {/*
\n
\n

\n
PREVIOUS
\n

\n
\n
\n

\n
NEXT
\n

\n
\n
*/}\n {/*
*/}\n
\n\n {allNews.map((data, key) => {\n\n if (data.node.id === wpNews.id) {\n const previousData = key + 1;\n\n const totalItems = allNews.length;\n\n if (previousData <= totalItems - 1) {\n\n let content = allNews[previousData].node.content;\n const wordsPerMinute = 200;\n const wordCount = content.split(/\\s+/).length;\n const readingTimeMinutes = Math.ceil(\n wordCount / wordsPerMinute\n );\n const nextDateObject = getFormatDate(allNews[previousData].node.press_release_acf.publishedDate);\n const nextDisplayDate = format(nextDateObject, 'MMMM d, yyyy');\n\n var date = nextDisplayDate;\n var arr1 = date.split(' ');\n var arr2 = arr1[1].split(',');\n var arr3 = arr1[2];\n var month = arr1[0];\n\n console.log(arr2,\"arr2\");\n console.log(arr3,\"arr3\");\n console.log(arr1[0],\"arr1\");\n \n // var nextnewsandinsightsdate = translateDate(month,wpNews.locale.id)+' '+arr2[0]+ SiteTrans.comma_article_txt[wpNews.locale.id] +arr3;\n if(wpNews.locale.id==\"ar\"){\n var nextnewsandinsightsdate = arr2[0]+' '+translateDate(month,wpNews.locale.id)+SiteTrans.comma_article_txt[wpNews.locale.id]+arr3;\n }else{\n var nextnewsandinsightsdate = translateDate(month,wpNews.locale.id)+' '+arr2[0]+ SiteTrans.comma_article_txt[wpNews.locale.id]+arr3;\n }\n return (\n
\n
\n
\n {/*

*/}\n
\n
\n
\n

\n
\n {SiteTrans.read_txt[wpNews.locale.id]}\n
\n {SiteTrans.next_txt[wpNews.locale.id]}\n
\n
\n
\n
\n {\n allNews[previousData].node.press_release_acf\n .shortTitle\n }\n
\n\n
\n

\n
\n {\n allNews[previousData].node.press_release_acf\n .location\n }\n \n
\n
\n {\n nextnewsandinsightsdate\n }\n \n
\n

\n
\n {readingTimeMinutes} {SiteTrans.minute_read_txt[wpNews.locale.id]}\n \n
\n
\n \n );\n } else {\n\n }\n }\n })}\n
\n