mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-05-23 18:58:12 +00:00
30 lines
610 B
Swift
30 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))
|
||
|
}
|
||
|
}
|
||
|
}
|