Skip to content

Commit

Permalink
Create empty profile on skip for now
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman authored and TonyGiorgio committed Mar 29, 2024
1 parent f307be7 commit 46755a6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/routes/setup/ImportProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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("/");
}
Expand Down
10 changes: 9 additions & 1 deletion src/routes/setup/NewProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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("/");
}
Expand Down

0 comments on commit 46755a6

Please sign in to comment.