From 6bc5356ac10a8676dbf79f8e2387bf6b80a81201 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Sun, 20 Aug 2023 20:42:14 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A9=94=EC=9D=B8=20=ED=95=98=EB=8B=A8=20?= =?UTF-8?q?=ED=83=AD=20-=20=EB=9D=BC=EC=9D=B4=EB=B8=8C,=20=EC=BD=98?= =?UTF-8?q?=ED=85=90=EC=B8=A0=20=EC=88=9C=EC=84=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Main/Home/BottomTabView.swift | 50 +++++++++---------- .../Sources/Main/Home/HomeViewModel.swift | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/SodaLive/Sources/Main/Home/BottomTabView.swift b/SodaLive/Sources/Main/Home/BottomTabView.swift index eb324f1..9d1031d 100644 --- a/SodaLive/Sources/Main/Home/BottomTabView.swift +++ b/SodaLive/Sources/Main/Home/BottomTabView.swift @@ -15,31 +15,6 @@ struct BottomTabView: View { HStack(spacing: 0) { let tabWidth = width / 5 - TabButton( - title: "라이브", - action: { - if currentTab != .live { - currentTab = .live - } - }, - image: { - currentTab == .live ? - "ic_tabbar_live_selected" : - "ic_tabbar_live_normal" - }, - fontName: { - currentTab == .live ? - Font.bold.rawValue : - Font.medium.rawValue - }, - color: { - currentTab == .live ? - Color(hex: "9970ff") : - Color(hex: "909090") - }, - width: tabWidth - ) - TabButton( title: "콘텐츠", action: { @@ -65,6 +40,31 @@ struct BottomTabView: View { width: tabWidth ) + TabButton( + title: "라이브", + action: { + if currentTab != .live { + currentTab = .live + } + }, + image: { + currentTab == .live ? + "ic_tabbar_live_selected" : + "ic_tabbar_live_normal" + }, + fontName: { + currentTab == .live ? + Font.bold.rawValue : + Font.medium.rawValue + }, + color: { + currentTab == .live ? + Color(hex: "9970ff") : + Color(hex: "909090") + }, + width: tabWidth + ) + TabButton( title: "탐색", action: { diff --git a/SodaLive/Sources/Main/Home/HomeViewModel.swift b/SodaLive/Sources/Main/Home/HomeViewModel.swift index 0515dc6..7d5c444 100644 --- a/SodaLive/Sources/Main/Home/HomeViewModel.swift +++ b/SodaLive/Sources/Main/Home/HomeViewModel.swift @@ -19,7 +19,7 @@ final class HomeViewModel: ObservableObject { case content, live, explorer, message, mypage } - @Published var currentTab: CurrentTab = .live + @Published var currentTab: CurrentTab = .content func pushTokenUpdate(pushToken: String) { userRepository.updatePushToken(pushToken: pushToken)