From 27746d592b72ccb04f51a6ba53b84d8de10382e9 Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Sun, 8 Sep 2024 12:22:43 +0200
Subject: Shwo unseen noitifications number

---
 app/(tabs)/index.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'app/(tabs)/index.tsx')

diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx
index 94e85d6..3303b28 100644
--- a/app/(tabs)/index.tsx
+++ b/app/(tabs)/index.tsx
@@ -95,6 +95,7 @@ export default function HomeScreen() {
     }
 
     try {
+      console.log(`${process.env.EXPO_PUBLIC_API_URL}/graphql`)
       const response = await fetch(`${process.env.EXPO_PUBLIC_API_URL}/graphql`, {
         method: 'POST',
         headers: {
@@ -170,7 +171,6 @@ export default function HomeScreen() {
 
   const handleLogout = async () => {
     await removeToken();
-    setToken('');
   };
 
   const removeToken = async () => {
@@ -181,6 +181,8 @@ export default function HomeScreen() {
       await AsyncStorage.removeItem('token');
       await AsyncStorage.removeItem('userId');
     }
+    setToken('');
+    setUserId('');
   };
 
   const fetchMapData = async () => {
@@ -241,7 +243,7 @@ export default function HomeScreen() {
   }, [region]);
 
   return (
-    <ParallaxScrollView>
+    <ParallaxScrollView token={token} userId={userId}>
       {token && userId ? (
         <>
           <ThemedView>
-- 
cgit v1.2.3-71-g8e6c

