import SwiftUI struct MainHomeFollowingEmptyStateView: View { let message: String let loginAction: (() -> Void)? init(message: String, loginAction: (() -> Void)? = nil) { self.message = message self.loginAction = loginAction } var body: some View { VStack(spacing: SodaSpacing.s16) { Spacer() Text(message) .appFont(.body3) .foregroundColor(Color.gray500) .multilineTextAlignment(.center) if let loginAction { Button(action: loginAction) { Text(I18n.HomeFollowing.loginButtonTitle) .appFont(size: 14, weight: .bold) .foregroundColor(.black) .padding(.horizontal, SodaSpacing.s16) .frame(height: 40) .background(Color.soda400) .clipShape(RoundedRectangle(cornerRadius: SodaRadius.r14, style: .continuous)) } .buttonStyle(.plain) } Spacer() } .frame(maxWidth: .infinity) .background(Color.black) } } struct MainHomeFollowingEmptyStateView_Previews: PreviewProvider { static var previews: some View { MainHomeFollowingEmptyStateView(message: I18n.HomeFollowing.emptyStateMessage) .frame(width: 390, height: 320) .previewLayout(.sizeThatFits) } }