Parcourir la source

Created Common Navigation Functions

Savio Fernando il y a 1 an
Parent
commit
51a24764ff
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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 }})
 }