fix: center no meetings yet ui

This commit is contained in:
Owen Gretzinger
2025-07-11 12:08:00 -04:00
parent 69a00f9aff
commit 74f7983da7
+10 -7
View File
@@ -8,13 +8,7 @@ struct MeetingListView: View {
var body: some View { var body: some View {
NavigationStack(path: $navigationPath) { NavigationStack(path: $navigationPath) {
List { List {
if viewModel.filteredMeetings.isEmpty && !viewModel.isLoading { // Only render meeting sections when there are meetings or loading state
ContentUnavailableView(
viewModel.searchText.isEmpty ? "No Meetings Yet" : "No Results",
systemImage: viewModel.searchText.isEmpty ? "mic.slash" : "magnifyingglass",
description: Text(viewModel.searchText.isEmpty ? "Start a new meeting to begin transcribing" : "Try a different search term")
)
} else {
ForEach(groupedMeetings, id: \.day) { dayGroup in ForEach(groupedMeetings, id: \.day) { dayGroup in
Section { Section {
ForEach(dayGroup.meetings) { meeting in ForEach(dayGroup.meetings) { meeting in
@@ -35,6 +29,15 @@ struct MeetingListView: View {
} }
} }
} }
.overlay {
if viewModel.filteredMeetings.isEmpty && !viewModel.isLoading {
ContentUnavailableView(
viewModel.searchText.isEmpty ? "No Meetings Yet" : "No Results",
systemImage: viewModel.searchText.isEmpty ? "mic.slash" : "magnifyingglass",
description: Text(viewModel.searchText.isEmpty ? "Start a new meeting to begin transcribing" : "Try a different search term")
)
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
} }
.navigationTitle("Meetings") .navigationTitle("Meetings")
.toolbar { .toolbar {