diff --git a/apps/web/app/(auth)/login/CharactersScene.tsx b/apps/web/app/(auth)/login/CharactersScene.tsx index ea167ec..a081452 100644 --- a/apps/web/app/(auth)/login/CharactersScene.tsx +++ b/apps/web/app/(auth)/login/CharactersScene.tsx @@ -2,7 +2,6 @@ import { motion } from 'motion/react' import { useEffect, useRef, useState, type MouseEvent } from 'react' -import { sound } from './audio' export interface CharacterSceneState { focusedField: 'none' | 'email' | 'submit' | 'google' @@ -93,27 +92,6 @@ export function CharactersScene({ state, onCharacterPoke }: CharactersSceneProps const handlePoke = (characterName: string) => { setPokeId(characterName) - switch (characterName) { - case 'red': - sound.playBoing() - break - case 'pink': - sound.playBlush() - break - case 'cyan': - sound.playFloat() - break - case 'blue': - sound.playGiggle() - break - case 'yellow': - sound.playSpin() - break - default: - sound.playPop(440) - break - } - if (onCharacterPoke) onCharacterPoke() setTimeout(() => { setPokeId(null) diff --git a/apps/web/app/(auth)/login/audio.ts b/apps/web/app/(auth)/login/audio.ts index 6df1159..8799b53 100644 --- a/apps/web/app/(auth)/login/audio.ts +++ b/apps/web/app/(auth)/login/audio.ts @@ -2,7 +2,7 @@ class SoundEffects { private ctx: AudioContext | null = null - public enabled = true + public enabled = false private initCtx() { if (!this.ctx && typeof window !== 'undefined') { diff --git a/apps/web/app/(auth)/login/page.test.tsx b/apps/web/app/(auth)/login/page.test.tsx index ffac55e..fcc8fa3 100644 --- a/apps/web/app/(auth)/login/page.test.tsx +++ b/apps/web/app/(auth)/login/page.test.tsx @@ -1,5 +1,6 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' +import { Providers } from '@/app/providers' import LoginPage from './page' // ========================================== @@ -17,6 +18,10 @@ vi.mock('./CharactersScene', () => ({ CharactersScene: () =>
, })) +function renderWithProviders(ui: React.ReactElement) { + return render(