Commit 71584879 by asranov0003

fix: fetch devices

parent 68681c80
......@@ -38,8 +38,11 @@ const Header: React.FC = () => {
useEffect(() => {
dispatch(accountSession());
dispatch(fetchDevices());
}, [dispatch]);
if (devices.length === 0) {
dispatch(fetchDevices());
}
}, [dispatch, devices]);
const handleOutsideClick = (e: MouseEvent) => {
if (sidebarRef.current && !sidebarRef.current.contains(e.target as Node)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment