Sfoglia il codice sorgente

Created Common Navigation Functions

Savio Fernando 1 anno fa
parent
commit
51a24764ff
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      src/constants/functions.js

+ 2 - 1
src/constants/functions.js

@@ -106,9 +106,10 @@ export const validateEmail = (email) => {
 
 export const navigateToArticle = (navigation,article_id,article_slug) => {
     navigation.push("NewsDetailPage",{slug: article_slug, id: article_id})
+    navigation.navigate("NewsDetailPage",{slug: article_slug, id: article_id})
   }
 
 
 export const navigateToListViewPage = (navigation,topic_type,topic) => {
-    navigation.navigate("NewsListPage", {type: topic_type, title: topic })
+    navigation.navigate("MainNav",{ screen : "NewsListPage", params :{type: topic_type, title: topic }})
 }