fix(app): use typed router push for pair-scan

This commit is contained in:
Mohamed Boudra
2026-02-05 13:45:46 +07:00
parent 8cf86a5d98
commit bac6277012
+6 -4
View File
@@ -638,11 +638,13 @@ export default function SettingsScreen() {
setIsPasteLinkVisible(true); setIsPasteLinkVisible(true);
}} }}
onScanQr={() => { onScanQr={() => {
const target = addConnectionTargetServerId; const targetServerId = addConnectionTargetServerId;
const source = target ? "editHost" : "settings"; const source = targetServerId ? "editHost" : "settings";
const qs = target ? `?source=${source}&targetServerId=${encodeURIComponent(target)}` : `?source=${source}`;
closeAddConnectionFlow(); closeAddConnectionFlow();
router.push(`/pair-scan${qs}`); router.push({
pathname: "/pair-scan",
params: targetServerId ? { source, targetServerId } : { source },
});
}} }}
/> />