라이브, 콘텐츠 메인 홈
- 크리에이터의 경우 라이브 만들기 / 콘텐츠 업로드 버튼이 바로 보이도록 수정
This commit is contained in:
parent
8a4a38a826
commit
e8f909035a
|
@ -11,6 +11,7 @@ struct ContentMainTabHomeView: View {
|
||||||
|
|
||||||
@StateObject var viewModel = ContentMainTabHomeViewModel()
|
@StateObject var viewModel = ContentMainTabHomeViewModel()
|
||||||
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
|
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
|
||||||
|
@AppStorage("role") private var role: String = UserDefaults.string(forKey: UserDefaultsKey.role)
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
BaseView(isLoading: $viewModel.isLoading) {
|
BaseView(isLoading: $viewModel.isLoading) {
|
||||||
|
@ -274,7 +275,7 @@ struct ContentMainTabHomeView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue {
|
if role == MemberRole.CREATOR.rawValue {
|
||||||
HStack(spacing: 5) {
|
HStack(spacing: 5) {
|
||||||
Image("ic_thumb_play")
|
Image("ic_thumb_play")
|
||||||
.resizable()
|
.resizable()
|
||||||
|
|
|
@ -13,6 +13,7 @@ struct LiveView: View {
|
||||||
@StateObject var viewModel = LiveViewModel()
|
@StateObject var viewModel = LiveViewModel()
|
||||||
@StateObject var appState = AppState.shared
|
@StateObject var appState = AppState.shared
|
||||||
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
|
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
|
||||||
|
@AppStorage("role") private var role: String = UserDefaults.string(forKey: UserDefaultsKey.role)
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
|
@ -124,7 +125,7 @@ struct LiveView: View {
|
||||||
viewModel.getSummary()
|
viewModel.getSummary()
|
||||||
}
|
}
|
||||||
|
|
||||||
if !appState.isShowPlayer && UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue {
|
if !appState.isShowPlayer && role == MemberRole.CREATOR.rawValue {
|
||||||
Image("btn_make_live")
|
Image("btn_make_live")
|
||||||
.padding(.trailing, 16)
|
.padding(.trailing, 16)
|
||||||
.padding(.bottom, 16)
|
.padding(.bottom, 16)
|
||||||
|
|
Loading…
Reference in New Issue