Skip to content

Commit

Permalink
chore: Select Swift/Kotlin specifically in example
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Nov 14, 2024
1 parent b824959 commit 0d7b1a9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion example/src/screens/HybridObjectTestsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ interface TestCaseProps {
isOdd: boolean
}

const PLATFORM_LANGUAGE =
Platform.select({
android: 'Kotlin',
ios: 'Swift',
macos: 'Swift',
}) ?? '???'

function TestCase({
test,
onRunPressed,
Expand Down Expand Up @@ -160,7 +167,7 @@ export function HybridObjectTestsScreen() {
<View style={styles.topControls}>
<SegmentedControl
style={styles.segmentedControl}
values={['C++', 'Swift/Kotlin']}
values={['C++', PLATFORM_LANGUAGE]}
selectedIndex={selectedIndex}
onChange={({ nativeEvent: { selectedSegmentIndex } }) => {
setSelectedIndex(selectedSegmentIndex)
Expand Down

0 comments on commit 0d7b1a9

Please sign in to comment.