Skip to content

Commit

Permalink
hide lightning address field for new profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
futurepaul authored and TonyGiorgio committed Apr 29, 2024
1 parent d91c183 commit f34b4b8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
32 changes: 18 additions & 14 deletions src/components/EditProfileForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,24 @@ export function EditProfileForm(props: {
/>
)}
</Field>
<Field
name="lightningAddress"
validate={[email(i18n.t("contacts.email_error"))]}
>
{(field, props) => (
<TextField
{...props}
placeholder="[email protected]"
value={field.value}
error={field.error}
label={i18n.t("contacts.ln_address")}
/>
)}
</Field>
<Show when={props.cta !== "Create"}>
<Field
name="lightningAddress"
validate={[
email(i18n.t("contacts.email_error"))
]}
>
{(field, props) => (
<TextField
{...props}
placeholder="[email protected]"
value={field.value}
error={field.error}
label={i18n.t("contacts.ln_address")}
/>
)}
</Field>
</Show>
<Button
layout="full"
type="submit"
Expand Down
2 changes: 1 addition & 1 deletion src/routes/setup/NewProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function NewProfile() {
const profile = await state.mutiny_wallet?.setup_new_profile(
p.nym ? p.nym : DEFAULT_NOSTR_NAME,
p.imageUrl ? p.imageUrl : undefined,
p.lightningAddress ? p.lightningAddress : undefined,
undefined,
undefined
);
console.log("profile", profile);
Expand Down

0 comments on commit f34b4b8

Please sign in to comment.