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);
}}
onScanQr={() => {
const target = addConnectionTargetServerId;
const source = target ? "editHost" : "settings";
const qs = target ? `?source=${source}&targetServerId=${encodeURIComponent(target)}` : `?source=${source}`;
const targetServerId = addConnectionTargetServerId;
const source = targetServerId ? "editHost" : "settings";
closeAddConnectionFlow();
router.push(`/pair-scan${qs}`);
router.push({
pathname: "/pair-scan",
params: targetServerId ? { source, targetServerId } : { source },
});
}}
/>