Skip to content

Commit b4d8d8a

Browse files
committed
Implement code review changes, reuse defined color constants
1 parent 6300891 commit b4d8d8a

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

Recap/UIComponents/Buttons/TranscriptDropdownButton.swift

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct TranscriptDropdownButton: View {
2323

2424
VStack {
2525

26-
if (!isCollapsed) {
26+
if !isCollapsed {
2727
Text(transcriptText)
2828
}
2929
}
@@ -37,18 +37,11 @@ struct TranscriptDropdownButton: View {
3737
.padding(.vertical, UIConstants.Spacing.cardPadding)
3838
.background(
3939
RoundedRectangle(cornerRadius: 20)
40-
.fill(Color(hex: "242323"))
40+
.fill(UIConstants.Colors.cardSecondaryBackground)
4141
.overlay(
4242
RoundedRectangle(cornerRadius: 20)
4343
.stroke(
44-
LinearGradient(
45-
gradient: Gradient(stops: [
46-
.init(color: Color(hex: "979797").opacity(0.6), location: 0),
47-
.init(color: Color(hex: "979797").opacity(0.4), location: 1)
48-
]),
49-
startPoint: .top,
50-
endPoint: .bottom
51-
),
44+
UIConstants.Gradients.standardBorder,
5245
lineWidth: 1
5346
)
5447
)

Recap/UseCases/Summary/SummaryView.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ struct SummaryView: View {
55
let onClose: () -> Void
66
@ObservedObject var viewModel: SummaryViewModel
77
let recordingID: String?
8-
@State var showingTranscript: Bool = false
98

109
init(
1110
onClose: @escaping () -> Void,
@@ -153,7 +152,7 @@ struct SummaryView: View {
153152
let transcriptionText = recording.transcriptionText {
154153

155154
VStack(alignment: .leading, spacing: UIConstants.Spacing.cardInternalSpacing) {
156-
if (!transcriptionText.isEmpty) {
155+
if !transcriptionText.isEmpty {
157156
TranscriptDropdownButton(transcriptText: transcriptionText)
158157
}
159158

0 commit comments

Comments
 (0)