soundEffects #19
@ -10,6 +10,8 @@ import { Press_Start_2P, Texturina } from "next/font/google";
|
|||||||
import PlayerProvider from "../providers/PlayerProvider";
|
import PlayerProvider from "../providers/PlayerProvider";
|
||||||
import ModalProvider from "../providers/ModalProvider";
|
import ModalProvider from "../providers/ModalProvider";
|
||||||
import Script from "next/script";
|
import Script from "next/script";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
import { clickSound } from "../utils/soundsEffect";
|
||||||
|
|
||||||
const client = new QueryClient();
|
const client = new QueryClient();
|
||||||
const font = Texturina({ weight: ["400"], subsets: ["latin"] });
|
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"] });
|
const fontPixel = Press_Start_2P({ weight: ["400"], subsets: ["latin"] });
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }: AppProps) {
|
function MyApp({ Component, pageProps }: AppProps) {
|
||||||
|
useEffect(() => {
|
||||||
|
window.addEventListener("click", () => {
|
||||||
|
clickSound();
|
||||||
|
});
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener("click", () => {
|
||||||
|
clickSound();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<WagmiProvider config={config}>
|
<WagmiProvider config={config}>
|
||||||
<QueryClientProvider client={client}>
|
<QueryClientProvider client={client}>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user