diff --git a/src/components/DeckButton.tsx b/src/components/DeckButton.tsx index c8468b5..a56e72e 100644 --- a/src/components/DeckButton.tsx +++ b/src/components/DeckButton.tsx @@ -7,18 +7,24 @@ import { View, } from 'react-native'; +const ws = new WebSocket('ws://192.168.1.109:8069/ws'); + interface Props { text: string; } export default function DeckButton(props: Props) { + function pressed() { + ws.send(props.text); + } + return ( <> console.log(props.text)} + onPress={pressed} onLongPress={() => console.log('long press')}> {props.text}