Update index.tsx

This commit is contained in:
Mantasha Altab Noyela 2025-02-25 22:20:02 -08:00 committed by GitHub
parent 9952ea3687
commit a3288e2a31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,25 +38,23 @@ const IndexScreen = () => {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<ScrollView contentContainerStyle={{ padding: 20, flexGrow: 1 }}> <ScrollView contentContainerStyle={{ padding: 20, flexGrow: 1 }}>
<Text style={styles.title}>Poker Chip Helper</Text> <PlayerSelector playerCount={playerCount} setPlayerCount={setPlayerCount} />
<PlayerSelector playerCount={playerCount} setPlayerCount={setPlayerCount} /> <BuyInSelector setBuyInAmount={setBuyInAmount} />
<BuyInSelector setBuyInAmount={setBuyInAmount} /> <ChipDetection updateChipCount={updateChipCount} />
<ChipsSelector <ChipsSelector
totalChipsCount={totalChipsCount} totalChipsCount={totalChipsCount}
setTotalChipsCount={setTotalChipsCount} setTotalChipsCount={setTotalChipsCount}
numberOfChips={numberOfChips} numberOfChips={numberOfChips}
setNumberOfChips={setNumberOfChips} setNumberOfChips={setNumberOfChips}
/> />
<ChipDistributionSummary <ChipDistributionSummary
playerCount={playerCount} playerCount={playerCount}
buyInAmount={buyInAmount} buyInAmount={buyInAmount}
totalChipsCount={totalChipsCount} totalChipsCount={totalChipsCount}
/> />
<Button title="Save to Slot 1" onPress={() => handleSave("SLOT1")} disabled={buyInAmount === null} /> <Button title="Save to Slot 1" onPress={() => handleSave("SLOT1")} disabled={buyInAmount === null} />
<Button title="Save to Slot 2" onPress={() => handleSave("SLOT2")} disabled={buyInAmount === null} /> <Button title="Save to Slot 2" onPress={() => handleSave("SLOT2")} disabled={buyInAmount === null} />
<Button title="Load from Slot 1" onPress={() => handleLoad("SLOT1")} /> </ScrollView>
<Button title="Load from Slot 2" onPress={() => handleLoad("SLOT2")} />
</ScrollView>
</View> </View>
); );
}; };