1- "use client"
1+ "use client" ;
22
33import React , { useState } from "react" ;
44import { ReadonlyURLSearchParams , useRouter , useSearchParams } from "next/navigation" ;
@@ -15,6 +15,7 @@ import { useGamepads } from 'awesome-react-gamepads';
1515import ControllerIcon from "@components/icons/ControllerIcon" ;
1616import { useAudio } from '@context/AudioContext' ;
1717import accounts from "@src/config/accounts.json" ;
18+ import { SecretsView } from "./views/secrets" ;
1819import "./modal.css" ;
1920
2021const AUDIO_SRC = '/audio/nav.mp3' ;
@@ -37,6 +38,8 @@ export default function Modal() {
3738 console . log ( "Gamepad disconnected:" , gamepad ) ;
3839 setGamepadConnected ( false ) ;
3940 } ,
41+ onStart : onEsc ,
42+ onB : onEsc ,
4043 } ) ;
4144
4245 const [ modal , setModal ] = useState < string | null > ( modalParam ) ;
@@ -79,6 +82,9 @@ export default function Modal() {
7982 } else if ( modal === 'about' ) {
8083 title = 'About' ;
8184 view = < AboutView /> ;
85+ } else if ( modal === 'secrets' ) {
86+ title = 'Secrets' ;
87+ view = < SecretsView title = "Secrets" /> ;
8288 }
8389
8490 return (
@@ -121,7 +127,7 @@ export default function Modal() {
121127 ) }
122128 { ! gamepadConnected && mobileDetect . isDesktop ( ) && (
123129 < div className = "justify-between w-auto mt-4 text-lg hover:animate-pulse" >
124- <kbd className="px-2 py-1.5 text-gray-800 bg-gray-100 mx-[3px] border border-gray-200 rounded-lg dark:bg-gray-400/25 dark:text-white dark:border-gray-500/25">Esc</kbd>
130+ < kbd className = "px-2 py-1.5 text-gray-800 bg-gray-100 mx-0.75 border border-gray-200 rounded-lg dark:bg-gray-400/25 dark:text-white dark:border-gray-500/25" > Esc</ kbd >
125131 < span className = "mx-2 my-auto" > close</ span >
126132 </ div >
127133 ) }
0 commit comments