prevent "remove" button for showing for users logged as nothing.

This commit is contained in:
fiatjaf 2023-11-02 21:36:31 -03:00
parent 952d5f9f06
commit 568e47c00e
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -20,7 +20,7 @@ func inviteTreeComponent(ctx context.Context, inviter string, loggedUser string)
func userRowComponent(ctx context.Context, profile sdk.ProfileMetadata, loggedUser string) HTMLComponent {
button := Span("")
if isAncestorOf(loggedUser, profile.PubKey) && loggedUser != profile.PubKey {
if isAncestorOf(loggedUser, profile.PubKey) && loggedUser != "" {
button = Button("remove").
Class(buttonClass+" px-2 bg-red-100 hover:bg-red-300").
Attr(