notifications
This commit is contained in:
@@ -52,7 +52,7 @@ const InviteScreen: FC<InviteScreenProps> = ({ route }) => {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
try {
|
||||
const response = await apiCall(`http://192.168.1.9:9060/api/fund/group/details?groupId=${groupId}`, 'GET') as { status: string; data?: GroupDetails; message?: string };
|
||||
const response = await apiCall(`https://api.godemo.in/FundCollect/api/fund/group/details?groupId=${groupId}`, 'GET') as { status: string; data?: GroupDetails; message?: string };
|
||||
if (response.status === 'success' && response.data) {
|
||||
setGroupDetails(response.data);
|
||||
} else {
|
||||
@@ -76,7 +76,7 @@ const InviteScreen: FC<InviteScreenProps> = ({ route }) => {
|
||||
try {
|
||||
// Replace with your actual API call to join the group
|
||||
// For now, it just shows an alert.
|
||||
await apiCall(`http://192.168.1.9:9060/api/fund/groups/join/invite/${code}`, 'POST');
|
||||
await apiCall(`https://api.godemo.in/FundCollect/api/fund/groups/join/invite/${code}`, 'POST');
|
||||
Alert.alert('Success!', `You have requested to join "${groupDetails.groupName}".`);
|
||||
} catch (e: any) {
|
||||
Alert.alert('Join Error', e.message || 'An unexpected error occurred.');
|
||||
|
||||
@@ -20,6 +20,7 @@ import { LOGIN_URL, VARIFY_OTP_URL } from "../utils/ApiUrls";
|
||||
import colors from "../components/colors";
|
||||
import LinearGradient from "react-native-linear-gradient";
|
||||
import CustomAlert from "../components/CostomAlart";
|
||||
import FirebaseService from "../utils/firebase/firebaseServices";
|
||||
|
||||
const CELL_COUNT = 6;
|
||||
type OtpVerifyRouteProp = RouteProp<RootStackParamList, "OtpVarify">;
|
||||
@@ -125,7 +126,10 @@ export default function OtpVerificationScreen() {
|
||||
|
||||
if (res.data?.statusCode === 200) {
|
||||
const { jwt } = res.data?.data || {};
|
||||
console.log("✅ OTP Verified:", res.data);
|
||||
await saveToken(jwt);
|
||||
await FirebaseService.getFcmToken(res.data?.data?.userId);
|
||||
|
||||
|
||||
let hasActionRun = false;
|
||||
const successAction = () => {
|
||||
|
||||
@@ -58,7 +58,7 @@ const RequestList: React.FC = () => {
|
||||
setError(null);
|
||||
|
||||
const response = await fetch(
|
||||
"http://192.168.1.9:9060/api/fund/group/pending/request",
|
||||
"https://api.godemo.in/FundCollect/api/fund/group/pending/request",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
@@ -124,7 +124,7 @@ const RequestList: React.FC = () => {
|
||||
|
||||
// Make API call to approve the request
|
||||
const response = await fetch(
|
||||
`http://192.168.1.9:9060/api/fund/requests/${requestId}/approve`,
|
||||
`https://api.godemo.in/FundCollect/api/fund/requests/${requestId}/approve`,
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
@@ -170,7 +170,7 @@ const RequestList: React.FC = () => {
|
||||
|
||||
// Make API call to decline the request
|
||||
const response = await fetch(
|
||||
`http://192.168.1.9:9060/api/fund/requests/${requestedId}/reject?reason=/${reason}`,
|
||||
`https://api.godemo.in/FundCollect/api/fund/requests/${requestedId}/reject?reason=/${reason}`,
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
|
||||
@@ -56,7 +56,7 @@ const MemberScreen = ({ route }) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const response = await apiCall<ApiResponse>(
|
||||
`http://192.168.1.9:9060/api/fund/group/all/member?groupId=${groupId}`,
|
||||
`https://api.godemo.in/FundCollect/api/fund/group/all/member?groupId=${groupId}`,
|
||||
'GET'
|
||||
);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import { apiCall } from '../../utils/ApiHelper';
|
||||
import { BASE_URL } from '../../utils/ApiUrls';
|
||||
|
||||
// --- CONSTANTS ---
|
||||
const API_BASE_URL = 'http://192.168.1.9:9060/api/payments';
|
||||
const API_BASE_URL = 'https://api.godemo.in/FundCollect/api/payments';
|
||||
|
||||
// --- TYPE DEFINITIONS ---
|
||||
interface ApiResponse<T> {
|
||||
|
||||
@@ -43,7 +43,7 @@ const BecomeOrg = () => {
|
||||
const token = credentials.password;
|
||||
|
||||
const response = await fetch(
|
||||
"http://192.168.1.9:9060/api/organizer/registration/apply",
|
||||
"https://api.godemo.in/FundCollect/api/organizer/registration/apply",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
@@ -28,6 +28,8 @@ import { useDispatch } from "react-redux";
|
||||
import { clearUser, setUserData } from "../../redux/userSlice";
|
||||
import { StackNavigationProp } from "@react-navigation/stack";
|
||||
import { RootStackParamList } from "../../navigation/AppNavigator";
|
||||
import { firebase } from "@react-native-firebase/messaging";
|
||||
import FirebaseService from "../../utils/firebase/firebaseServices";
|
||||
|
||||
|
||||
type UserProfile = {
|
||||
@@ -303,6 +305,7 @@ const Profile = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
await FirebaseService.deleteFcmToken();
|
||||
|
||||
// Clear stored credentials
|
||||
await Keychain.resetGenericPassword();
|
||||
|
||||
Reference in New Issue
Block a user