Advertisement
maneesf

Bankpay: read/unread

Sep 3rd, 2021
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. const Home =  () => {
  3.  
  4.  
  5.   return(
  6.     ...
  7.     navigate("ChatList", {
  8.       updateTime: item.updated_at,
  9.       ...
  10.     })
  11.  
  12.     (item.updated_at === state.homeTransactions[item.phone_number])? showBlueDot(): null
  13.     ...
  14.   )
  15. }
  16.  
  17. const ChatScreen = ({route}) => {
  18.   const updateTime = route.params.updatedAt;
  19.  
  20.   useEffect(() => {
  21.     dispatch({
  22.       type: "UPDATE_TRANSACTION",
  23.       payload: {
  24.         phone: updateTime
  25.       }
  26.     })
  27.   })
  28. }
  29.  
  30. //reducer
  31.  
  32.  
  33. case "UPDAR...":
  34.   return {
  35.     ...state,
  36.     hameTransactions: {
  37.       ...state.homeTransactions,
  38.       ...action.payload
  39.     }
  40.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement