Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ Join our community of developers creating universal apps.

- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.

## Jira Issue KAN-8 Metadata

Unable to retrieve issue metadata from Jira due to access restrictions.

- Created date: unavailable (Jira access denied to this workspace)
- Last updated date: unavailable (Jira access denied to this workspace)
2 changes: 0 additions & 2 deletions app/(tabs)/explore.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import AddDoorForm from "@/components/addDoorForm";
import SingleDatePicker from "@/components/datePicker";
import { Text, View } from "react-native";

export default function Explore() {
Expand Down
2 changes: 1 addition & 1 deletion app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function Index() {
onPress={openDoor}
className="mt-5 text-lg font-medium bg-gray-600 text-gray-300 rounded-lg text-center"
>
Open Door
Open Door
</Animated.Text>
</View>
</View>
Expand Down
2 changes: 1 addition & 1 deletion app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const index = () => {
handleSignIn(user.user)
} catch (error: any) {
console.log(error)
alert('Sign in failed: ' + error.message);
alert('Sign up failed: ' + error.message);
}
}

Expand Down
3 changes: 1 addition & 2 deletions app/pendingRequestsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ export default function PendingRequestsModal() {
});
}

deleteRequest(friendId);

// Update UI
setRequests(requests.filter((request) => request.id !== friendId));
refreshUserData();
} catch (error) {
console.error("Error accepting request:", error);
}
Expand Down
8 changes: 4 additions & 4 deletions hooks/useUserData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function useUserData() {
const { user, isLoading } = useAuth();
const [userData, setUserData] = useState<any>(null);

const fetchUserData = async () => {
const fetchUserData = useCallback(async () => {
if (!user) return;

const db = getFirestore();
Expand All @@ -23,18 +23,18 @@ export function useUserData() {
} catch (error) {
console.error("Error fetching user data:", error);
}
};
}, [user]);

// Refresh function to manually fetch latest user data
const refreshUserData = useCallback(() => {
fetchUserData();
}, [user]);
}, [fetchUserData]);

useEffect(() => {
if (!isLoading) {
fetchUserData();
}
}, [user, isLoading]);
}, [fetchUserData, isLoading]);

return { userData, isLoading, refreshUserData };
}