mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-09-27 06:00:05 +00:00
29 lines
610 B
Swift
29 lines
610 B
Swift
import Models
|
|
import SwiftUI
|
|
import Env
|
|
|
|
public struct TagRowView: View {
|
|
@EnvironmentObject private var routeurPath: RouterPath
|
|
|
|
let tag: Tag
|
|
|
|
public init(tag: Tag) {
|
|
self.tag = tag
|
|
}
|
|
|
|
public var body: some View {
|
|
HStack {
|
|
VStack(alignment: .leading) {
|
|
Text("#\(tag.name)")
|
|
.font(.headline)
|
|
Text("\(tag.totalUses) posts from \(tag.totalAccounts) participants")
|
|
.font(.footnote)
|
|
.foregroundColor(.gray)
|
|
}
|
|
Spacer()
|
|
}
|
|
.onTapGesture {
|
|
routeurPath.navigate(to: .hashTag(tag: tag.name, account: nil))
|
|
}
|
|
}
|
|
}
|