Skip to content

Commit eda7653

Browse files
committed
feat: use TabBarRole.convert()
1 parent 2860e83 commit eda7653

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/react-native-bottom-tabs/ios/TabView/NewTabView.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ struct NewTabView: AnyTabView {
1717

1818
if !tabData.hidden || isFocused {
1919
let icon = props.icons[index]
20-
var role: TabRole? {
21-
if tabData.role == "search" {
22-
return .search
23-
}
24-
25-
return nil
26-
}
20+
let role = tabData.role?.convert() ?? nil
2721

2822
let platformChild = props.children[safe: index] ?? PlatformView()
2923
let child = RepresentableView(view: platformChild)

0 commit comments

Comments
 (0)