diff --git a/frontend/src/layouts/dashboard/top-nav.js b/frontend/src/layouts/dashboard/top-nav.js index 2e873ee..c906b9d 100644 --- a/frontend/src/layouts/dashboard/top-nav.js +++ b/frontend/src/layouts/dashboard/top-nav.js @@ -134,7 +134,11 @@ export const TopNav = (props) => { aria-describedby="scroll-dialog-description" > - + { {call.from} - + - {}}> + {}}> {
- {}}> + {}}> { if(users.length == 0){ console.log("users is empty") return ( -
- +
+
) }else { @@ -77,7 +81,9 @@ const Page = () => { if (x.email !== window.sessionStorage.getItem("email")){ return ( - + {
{status === "online" ? - { + { router.push({ pathname:"chat/room", query: {user: x.email} @@ -104,7 +112,9 @@ const Page = () => { : - + diff --git a/frontend/src/pages/devices.js b/frontend/src/pages/devices.js index 43eefa3..f39129d 100644 --- a/frontend/src/pages/devices.js +++ b/frontend/src/pages/devices.js @@ -31,7 +31,7 @@ const Page = () => { .then(response => response.json()) .then(json => setDevices(json)) .catch(error => console.error('Error:', error)); - }, []); + }, [auth.user]); return (devices && <>