fix: redirect to preset

This commit is contained in:
Carlos Valente
2025-09-08 06:09:00 +02:00
parent 67e67d6a5d
commit 321297b685
2 changed files with 6 additions and 2 deletions
@@ -35,10 +35,11 @@ export function RedirectClientModal({ id, isOpen, name, currentPath, origin, onC
}
if (newPath.startsWith('preset-')) {
setRedirect({ target: id, redirect: newPath.slice(7) });
} else {
setRedirect({ target: id, redirect: newPath });
}
setRedirect({ target: id, redirect: newPath });
onClose();
};
+4 -1
View File
@@ -10,7 +10,10 @@ const createSelector =
export const setClientRemote = {
setIdentify: (payload: { target: string; identify: boolean }) => sendSocket('client', payload),
setRedirect: (payload: { target: string; redirect: string }) => sendSocket('client', payload),
setRedirect: (payload: { target: string; redirect: string }) => {
console.log('--- got', payload);
sendSocket('client', payload);
},
setClientName: (payload: { target: string; rename: string }) => sendSocket('client', payload),
};