fix: center no meetings yet ui
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user