Skip to content

Commit dab5da8

Browse files
committed
fix: improvements to code style
1 parent b1e263b commit dab5da8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

WooCommerce/Classes/ViewRelated/Hub Menu/HubMenu.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ struct HubMenu: View {
3333
HubMenuElement(image: menu.icon, text: menu.title, onTapGesture: {
3434
switch menu {
3535
case .woocommerceAdmin:
36-
ServiceLocator.analytics.track(.hubMenuOptionTapped, withProperties: ["option": "admin_menu"])
36+
ServiceLocator.analytics.track(.hubMenuOptionTapped, withProperties: [Constants.option: "admin_menu"])
3737
showingWooCommerceAdmin = true
3838
case .viewStore:
39-
ServiceLocator.analytics.track(.hubMenuOptionTapped, withProperties: ["option": "view_store"])
39+
ServiceLocator.analytics.track(.hubMenuOptionTapped, withProperties: [Constants.option: "view_store"])
4040
showingViewStore = true
4141
case .reviews:
42-
ServiceLocator.analytics.track(.hubMenuOptionTapped, withProperties: ["option": "reviews"])
42+
ServiceLocator.analytics.track(.hubMenuOptionTapped, withProperties: [Constants.option: "reviews"])
4343
showingReviews = true
4444
case .coupons:
45-
ServiceLocator.analytics.track(.hubMenuOptionTapped, withProperties: ["option": "coupons"])
45+
ServiceLocator.analytics.track(.hubMenuOptionTapped, withProperties: [Constants.option: "coupons"])
4646
showingCoupons = true
4747
}
4848
})
@@ -154,6 +154,7 @@ struct HubMenu: View {
154154
static let padding: CGFloat = 16
155155
static let topBarSpacing: CGFloat = 2
156156
static let avatarSize: CGFloat = 40
157+
static let option = "option"
157158
}
158159

159160
private enum Localization {

0 commit comments

Comments
 (0)