Hide Edit Button on Profile Page for the user not logged in w/Private Key

Changelog-Fixed: Hide edit button on profile page when no private key
Closes: #215
This commit is contained in:
Swift authored and William Casarin committed 2023-01-02 18:33:09 -08:00
1 parent 8428f0af43
commit 2348f64dff
1 file changed
+4 -2
+4 -2
View File
@@ -196,8 +196,10 @@ struct ProfileView: View {
follow_state: damus_state.contacts.follow_state(profile.pubkey) follow_state: damus_state.contacts.follow_state(profile.pubkey)
) )
} else { } else {
NavigationLink(destination: EditMetadataView(damus_state: damus_state)) { if damus_state.keypair.privkey != nil {
EditButton(damus_state: damus_state) NavigationLink(destination: EditMetadataView(damus_state: damus_state)) {
EditButton(damus_state: damus_state)
}
} }
} }