Files

28 lines
678 B
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// The MIT License (MIT)
//
// Copyright (c) 2020–2023 Alexander Grebenyuk (github.com/kean).
import SwiftUI
import Pulse
struct NetworkMetricsCell: View {
let task: NetworkTaskEntity
var body: some View {
NavigationLink(destination: destinationMetrics) {
NetworkMenuCell(
icon: "clock.fill",
tintColor: .orange,
title: "Metrics",
details: ""
)
}.disabled(!task.hasMetrics)
}
private var destinationMetrics: some View {
NetworkInspectorMetricsViewModel(task: task).map {
NetworkInspectorMetricsView(viewModel: $0)
}
}
}