fixed (I hope so) insertContact function

This commit is contained in:
slawk0
2025-01-04 23:35:10 +01:00
parent 930ae98ab7
commit 17c2427413
4 changed files with 221 additions and 104 deletions

View File

@@ -15,7 +15,10 @@ function ContactProfile() {
<img className="w-4 mr-2 invert" src={profile} alt="profile img" />
)}
<p>{currentContact ? currentContact.username : null}</p>
<p>
{currentContact ? currentContact.username : null} user id:{' '}
{currentContact?.user_id} conv id: {currentContact?.conversation_id}
</p>
</div>
<div className="flex-grow"></div>

View File

@@ -34,6 +34,10 @@ export function AuthProvider({ children }: { children: ReactNode }) {
withCredentials: true,
});
setUser({ username: res.data.username, id: res.data.user_id });
console.info('user: : ', {
username: res.data.username,
id: res.data.user_id,
});
setAuthorized(true);
} catch (err) {
setAuthorized(false);