Fix errors
This commit is contained in:
parent
8b9cbdfc0f
commit
2e36b01266
@ -114,7 +114,7 @@ const RelationshipView: React.FC<RelationshipProps> = ({ pfpUrl }) => {
|
|||||||
setStatus(null);
|
setStatus(null);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error updating relationship status:', error);
|
console.log('Error updating relationship status:', error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleAcceptRequest = () => handleUpdateRelationshipStatus('accepted');
|
const handleAcceptRequest = () => handleUpdateRelationshipStatus('accepted');
|
||||||
|
@ -131,12 +131,9 @@ export const saveInitialData = async (initialData: InitialData) => {
|
|||||||
try {
|
try {
|
||||||
await SecureStore.setItemAsync('user', JSON.stringify(initialData.user));
|
await SecureStore.setItemAsync('user', JSON.stringify(initialData.user));
|
||||||
if (initialData.relationshipData) {
|
if (initialData.relationshipData) {
|
||||||
console.log('Saving relationship data to SecureStore...');
|
|
||||||
console.log('Relationship:', initialData.relationshipData.relationship);
|
|
||||||
await SecureStore.setItemAsync(
|
await SecureStore.setItemAsync(
|
||||||
'relationship', JSON.stringify(initialData.relationshipData.relationship)
|
'relationship', JSON.stringify(initialData.relationshipData.relationship)
|
||||||
);
|
);
|
||||||
console.log('Partner:', initialData.relationshipData.partner);
|
|
||||||
await SecureStore.setItemAsync(
|
await SecureStore.setItemAsync(
|
||||||
'partner', JSON.stringify(initialData.relationshipData.partner)
|
'partner', JSON.stringify(initialData.relationshipData.partner)
|
||||||
);
|
);
|
||||||
|
@ -141,7 +141,6 @@ export const updateRelationshipStatus = async (userId: number, status: 'accepted
|
|||||||
const updatedRelationshipData = await response.json() as RelationshipData;
|
const updatedRelationshipData = await response.json() as RelationshipData;
|
||||||
return updatedRelationshipData;
|
return updatedRelationshipData;
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
console.error('Error updating relationship status:', error);
|
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user