clickSound in app
Some checks failed
CI / Foundry project (push) Waiting to run
CI / Foundry project (pull_request) Has been cancelled

This commit is contained in:
mindxploit 2024-11-03 14:00:37 +01:00
parent bd0cc6c34d
commit 404a23b2e1

View File

@ -10,6 +10,8 @@ import { Press_Start_2P, Texturina } from "next/font/google";
import PlayerProvider from "../providers/PlayerProvider";
import ModalProvider from "../providers/ModalProvider";
import Script from "next/script";
import { useEffect } from "react";
import { clickSound } from "../utils/soundsEffect";
const client = new QueryClient();
const font = Texturina({ weight: ["400"], subsets: ["latin"] });
@ -18,6 +20,18 @@ const font = Texturina({ weight: ["400"], subsets: ["latin"] });
const fontPixel = Press_Start_2P({ weight: ["400"], subsets: ["latin"] });
function MyApp({ Component, pageProps }: AppProps) {
useEffect(() => {
window.addEventListener("click", () => {
clickSound();
});
return () => {
window.removeEventListener("click", () => {
clickSound();
});
};
}, []);
return (
<WagmiProvider config={config}>
<QueryClientProvider client={client}>