fix(app): use typed router push for pair-scan
This commit is contained in:
@@ -637,14 +637,16 @@ export default function SettingsScreen() {
|
|||||||
setIsAddHostMethodVisible(false);
|
setIsAddHostMethodVisible(false);
|
||||||
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({
|
||||||
router.push(`/pair-scan${qs}`);
|
pathname: "/pair-scan",
|
||||||
}}
|
params: targetServerId ? { source, targetServerId } : { source },
|
||||||
/>
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
<AddHostModal
|
<AddHostModal
|
||||||
visible={isDirectHostVisible}
|
visible={isDirectHostVisible}
|
||||||
|
|||||||
Reference in New Issue
Block a user