Changes
This commit is contained in:
+7
-1
@@ -6,6 +6,7 @@ import MainLayout from '@/components/MainLayout';
|
||||
import MatrixCursor from '@/components/MatrixCursor';
|
||||
import { VERIFIED_KEY, BYPASS_KEY } from '@/components/HumanVerification';
|
||||
import { useSettings } from '@/contexts/SettingsContext';
|
||||
import { useAchievements } from '@/contexts/AchievementsContext';
|
||||
import { useKonamiCode } from '@/hooks/useKonamiCode';
|
||||
import { toast } from '@/hooks/use-toast';
|
||||
|
||||
@@ -33,6 +34,7 @@ const Index = () => {
|
||||
const [showConsentModal, setShowConsentModal] = useState(false);
|
||||
const [konamiActive, setKonamiActive] = useState(false);
|
||||
const { crtEnabled, playSound } = useSettings();
|
||||
const { unlockAchievement } = useAchievements();
|
||||
const { activated: konamiActivated, reset: resetKonami } = useKonamiCode();
|
||||
const location = useLocation();
|
||||
|
||||
@@ -45,6 +47,9 @@ const Index = () => {
|
||||
if (konamiActivated) {
|
||||
setKonamiActive(true);
|
||||
|
||||
// Unlock achievement
|
||||
unlockAchievement('konami_master');
|
||||
|
||||
// Play special sound sequence
|
||||
playSound('success');
|
||||
setTimeout(() => playSound('boot'), 200);
|
||||
@@ -62,7 +67,7 @@ const Index = () => {
|
||||
resetKonami();
|
||||
}, 3000);
|
||||
}
|
||||
}, [konamiActivated, playSound, resetKonami]);
|
||||
}, [konamiActivated, playSound, resetKonami, unlockAchievement]);
|
||||
|
||||
// Persist theme to localStorage
|
||||
useEffect(() => {
|
||||
@@ -95,6 +100,7 @@ const Index = () => {
|
||||
const toggleTheme = () => {
|
||||
setIsRedTheme(!isRedTheme);
|
||||
playSound('click');
|
||||
unlockAchievement('theme_switcher');
|
||||
};
|
||||
|
||||
const handleConsentClose = () => {
|
||||
|
||||
Reference in New Issue
Block a user