Create empty profile on skip for now

This commit is contained in:
benthecarman
2024-03-28 18:10:21 -05:00
committed by Tony Giorgio
parent f307be7533
commit 46755a69b9
2 changed files with 19 additions and 2 deletions

View File

@@ -2,11 +2,20 @@ import { useNavigate } from "@solidjs/router";
import { Show } from "solid-js";
import { Button, ButtonLink, DefaultMain, ImportNsecForm } from "~/components";
import { useMegaStore } from "~/state/megaStore";
export function ImportProfile() {
const [state, _actions] = useMegaStore();
const navigate = useNavigate();
function handleSkip() {
async function handleSkip() {
// set up an empty profile so we at least have some kind0 event
await state.mutiny_wallet?.edit_nostr_profile(
"Anon",
undefined,
undefined,
undefined
);
localStorage.setItem("profile_setup_stage", "skipped");
navigate("/");
}

View File

@@ -16,7 +16,15 @@ export function NewProfile() {
const navigate = useNavigate();
function handleSkip() {
async function handleSkip() {
// set up an empty profile so we at least have some kind0 event
const profile = await state.mutiny_wallet?.edit_nostr_profile(
"Anon",
undefined,
undefined,
undefined
);
console.log("profile", profile);
localStorage.setItem("profile_setup_stage", "skipped");
navigate("/");
}