first implementation
This commit is contained in:
parent
79458bcba4
commit
870804e7b9
24 changed files with 5485 additions and 184 deletions
|
|
@ -12,6 +12,7 @@ interface ProfileData {
|
|||
telegram: string | null;
|
||||
signal: string | null;
|
||||
nostr_npub: string | null;
|
||||
godfather_email: string | null;
|
||||
}
|
||||
|
||||
interface FormData {
|
||||
|
|
@ -122,6 +123,7 @@ export default function ProfilePage() {
|
|||
signal: "",
|
||||
nostr_npub: "",
|
||||
});
|
||||
const [godfatherEmail, setGodfatherEmail] = useState<string | null>(null);
|
||||
const [errors, setErrors] = useState<FieldErrors>({});
|
||||
const [isLoadingProfile, setIsLoadingProfile] = useState(true);
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
|
|
@ -150,6 +152,7 @@ export default function ProfilePage() {
|
|||
const formValues = toFormData(data);
|
||||
setFormData(formValues);
|
||||
setOriginalData(formValues);
|
||||
setGodfatherEmail(data.godfather_email);
|
||||
} catch (err) {
|
||||
console.error("Profile load error:", err);
|
||||
setToast({ message: "Failed to load profile", type: "error" });
|
||||
|
|
@ -302,6 +305,22 @@ export default function ProfilePage() {
|
|||
</span>
|
||||
</div>
|
||||
|
||||
{/* Godfather - shown if user was invited */}
|
||||
{godfatherEmail && (
|
||||
<div style={styles.field}>
|
||||
<label style={styles.label}>
|
||||
Invited By
|
||||
<span style={styles.readOnlyBadge}>Read only</span>
|
||||
</label>
|
||||
<div style={styles.godfatherBox}>
|
||||
<span style={styles.godfatherEmail}>{godfatherEmail}</span>
|
||||
</div>
|
||||
<span style={styles.hint}>
|
||||
The user who invited you to join.
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div style={styles.divider} />
|
||||
|
||||
<p style={styles.sectionLabel}>Contact Details</p>
|
||||
|
|
@ -483,6 +502,17 @@ const pageStyles: Record<string, React.CSSProperties> = {
|
|||
color: "rgba(255, 255, 255, 0.5)",
|
||||
cursor: "not-allowed",
|
||||
},
|
||||
godfatherBox: {
|
||||
padding: "0.875rem 1rem",
|
||||
background: "rgba(99, 102, 241, 0.08)",
|
||||
border: "1px solid rgba(99, 102, 241, 0.2)",
|
||||
borderRadius: "12px",
|
||||
},
|
||||
godfatherEmail: {
|
||||
fontFamily: "'DM Sans', system-ui, sans-serif",
|
||||
fontSize: "1rem",
|
||||
color: "rgba(129, 140, 248, 0.9)",
|
||||
},
|
||||
inputError: {
|
||||
border: "1px solid rgba(239, 68, 68, 0.5)",
|
||||
boxShadow: "0 0 0 2px rgba(239, 68, 68, 0.1)",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue