mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
fix(app): use typed router push for pair-scan
This commit is contained in:
@@ -637,14 +637,16 @@ export default function SettingsScreen() {
|
||||
setIsAddHostMethodVisible(false);
|
||||
setIsPasteLinkVisible(true);
|
||||
}}
|
||||
onScanQr={() => {
|
||||
const target = addConnectionTargetServerId;
|
||||
const source = target ? "editHost" : "settings";
|
||||
const qs = target ? `?source=${source}&targetServerId=${encodeURIComponent(target)}` : `?source=${source}`;
|
||||
closeAddConnectionFlow();
|
||||
router.push(`/pair-scan${qs}`);
|
||||
}}
|
||||
/>
|
||||
onScanQr={() => {
|
||||
const targetServerId = addConnectionTargetServerId;
|
||||
const source = targetServerId ? "editHost" : "settings";
|
||||
closeAddConnectionFlow();
|
||||
router.push({
|
||||
pathname: "/pair-scan",
|
||||
params: targetServerId ? { source, targetServerId } : { source },
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
||||
<AddHostModal
|
||||
visible={isDirectHostVisible}
|
||||
|
||||
Reference in New Issue
Block a user