FIX: remove '/' from host in client-control(#1156)

This commit is contained in:
Alex Christoffer Rasmussen
2024-07-30 12:36:31 +02:00
committed by GitHub
parent e500fa6b5e
commit ce8b0d9850
3 changed files with 4 additions and 5 deletions
@@ -12,9 +12,7 @@ export const useClientPath = () => {
// notify of client path changes
useEffect(() => {
//remove leading '/' from path
const fullPath = (pathname.startsWith('/') ? pathname.slice(1) : pathname) + search;
socketSendJson('set-client-path', fullPath);
socketSendJson('set-client-path', pathname + search);
}, [pathname, search]);
// navigate to new path when received from server