fix log color

This commit is contained in:
Lara REALI 2023-06-26 07:26:27 +02:00
parent 49d73b92d3
commit 53106b33bc
3 changed files with 522 additions and 546 deletions

File diff suppressed because it is too large Load Diff

View File

@ -74,14 +74,10 @@ export class loginClass {
friends: null, friends: null,
blocked: null, blocked: null,
photo: null, photo: null,
sessionNumber: 1, sessionNumber: 0,
}; };
await this.usersService.create(user); await this.usersService.create(user);
} }
// if (user.status !== 2) //super
// user.status = 1;
// user.sessionNumber++;
console.log(user.sessionNumber);
const myJSON = JSON.stringify(user); const myJSON = JSON.stringify(user);
console.log(`in login42 user= ${myJSON}`) console.log(`in login42 user= ${myJSON}`)

View File

@ -36,18 +36,7 @@ function AnimatedRoute() {
} }
}; };
window.addEventListener('beforeunload', handleBeforeUnload);
return () => {
window.removeEventListener('beforeunload', handleBeforeUnload);
};
}, []);
useEffect(() => {
const handleLoad = async () => { const handleLoad = async () => {
console.log('Page loaded');
console.log("je suis a addSession");
if (!localStorage.getItem('token')) if (!localStorage.getItem('token'))
return; return;
try { try {
@ -57,9 +46,10 @@ function AnimatedRoute() {
} }
}; };
window.addEventListener('load', handleLoad); handleLoad();
window.addEventListener('beforeunload', handleBeforeUnload);
return () => { return () => {
window.removeEventListener('load', handleLoad); window.removeEventListener('beforeunload', handleBeforeUnload);
}; };
}, []); }, []);