Felix Zieger commited on
Commit
bf1b7c7
·
1 Parent(s): 533ae65

only track once

Browse files
Files changed (1) hide show
  1. src/components/GameContainer.tsx +0 -26
src/components/GameContainer.tsx CHANGED
@@ -140,32 +140,6 @@ export const GameContainer = () => {
140
  const sentenceString = finalSentence.join(' ');
141
  const guess = await guessWord(sentenceString, language);
142
  setAiGuess(guess);
143
-
144
- // Save game result with session ID
145
- try {
146
- const { error } = await supabase
147
- .from('game_results')
148
- .insert({
149
- target_word: currentWord,
150
- description: sentenceString,
151
- ai_guess: guess,
152
- is_correct: guess.toLowerCase() === currentWord.toLowerCase(),
153
- session_id: sessionId
154
- });
155
-
156
- if (error) {
157
- console.error('Error saving game result:', error);
158
- throw error;
159
- }
160
- } catch (error) {
161
- console.error('Error in database operation:', error);
162
- toast({
163
- title: "Error",
164
- description: "Failed to save game result. Please try again.",
165
- variant: "destructive",
166
- });
167
- }
168
-
169
  setGameState("showing-guess");
170
  } catch (error) {
171
  console.error('Error getting AI guess:', error);
 
140
  const sentenceString = finalSentence.join(' ');
141
  const guess = await guessWord(sentenceString, language);
142
  setAiGuess(guess);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  setGameState("showing-guess");
144
  } catch (error) {
145
  console.error('Error getting AI guess:', error);