pick a federation on setup

This commit is contained in:
Paul Miller
2024-04-11 09:56:22 -05:00
parent 936f66f454
commit 11e0b8655b
10 changed files with 188 additions and 73 deletions

View File

@@ -6,7 +6,7 @@ import { createSignal, Show } from "solid-js";
import { Button, InfoBox, SimpleInput } from "~/components";
import { useMegaStore } from "~/state/megaStore";
export function ImportNsecForm() {
export function ImportNsecForm(props: { setup?: boolean }) {
const [state, _actions] = useMegaStore();
const navigate = useNavigate();
const [nsec, setNsec] = createSignal("");
@@ -29,7 +29,11 @@ export function ImportNsecForm() {
undefined
);
console.log("Changed to new npub: ", new_npub);
navigate("/");
if (props.setup) {
navigate("/addfederation");
} else {
navigate("/");
}
} catch (e) {
console.error(e);
setError("Invalid nsec");