Skip to content

Commit

Permalink
fix: API Key can't be removed (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhermawan authored Jan 4, 2024
1 parent f1d8647 commit 64c9628
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import CoreViews
import SwiftUI
import ViewCondition

struct APIKeyPicker: View {
@Binding private var apiKey: String?
Expand Down Expand Up @@ -49,7 +50,9 @@ struct APIKeyPicker: View {
}
} header: {
SectionHeader("API Key")
.action("Remove", action: {})
.if(apiKey.isNotNil) { view in
view.action("Remove", action: removeAction)
}
} footer: {
if apiKey.isNil {
FootnoteText("FOOTNOTE_API_KEY_SETUP")
Expand Down

0 comments on commit 64c9628

Please sign in to comment.