Fix errors

This commit is contained in:
Gabriel Brown 2024-10-21 11:04:42 -05:00
parent 8b9cbdfc0f
commit 2e36b01266
3 changed files with 1 additions and 5 deletions

View File

@ -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');

View File

@ -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)
); );

View File

@ -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;
} }
}; };