Skip to content

Commit 5b0cbba

Browse files
committed
feat: more achievements
1 parent b43375c commit 5b0cbba

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

src/components/Sidebar.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import Fez from './Fez';
4040
import { version } from '../version';
4141
import usePersistentState from '../hooks/usePersistentState';
4242
import { KEY_SIDEBAR_STATE } from '../utils/LocalStorageManager';
43+
import { useAchievements } from '../context/AchievementContext';
4344

4445
const Sidebar = ({ isOpen, toggleSidebar, toggleModal, setIsPaletteOpen }) => {
4546
const [sidebarState, setSidebarState] = usePersistentState(
@@ -54,6 +55,7 @@ const Sidebar = ({ isOpen, toggleSidebar, toggleModal, setIsPaletteOpen }) => {
5455
},
5556
);
5657

58+
const { unlockAchievement } = useAchievements();
5759
const scrollRef = useRef(null);
5860
const [showScrollGradient, setShowScrollGradient] = useState({
5961
top: false,
@@ -412,6 +414,7 @@ const Sidebar = ({ isOpen, toggleSidebar, toggleModal, setIsPaletteOpen }) => {
412414
<div className="flex flex-col gap-2 mb-4">
413415
<NavLink
414416
to="/random"
417+
onClick={() => unlockAchievement('feeling_lucky')}
415418
className="px-3 py-2 text-sm rounded-lg border border-gray-700/50 bg-gray-900/40 text-gray-300 hover:text-white hover:bg-gray-800/60 transition-colors duration-200 flex items-center justify-center gap-2 w-full font-mono"
416419
>
417420
<ShuffleIcon size={16} />

src/config/achievements.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
LogIcon,
2121
KanbanIcon,
2222
PhoneIcon,
23+
ShuffleIcon,
2324
} from '@phosphor-icons/react';
2425

2526
export const ACHIEVEMENTS = [
@@ -346,4 +347,39 @@ export const ACHIEVEMENTS = [
346347
icon: <PhoneIcon size={32} weight="duotone" />,
347348
category: 'Secret',
348349
},
350+
{
351+
id: 'the_number_of_monkeys',
352+
title: 'The Number of Monkeys',
353+
description: 'Ask Bruce.',
354+
icon: <ShuffleIcon size={32} weight="duotone" />,
355+
category: 'Secret',
356+
},
357+
{
358+
id: 'some_bodies_gonna_get_it',
359+
title: 'Some Bodies Gonna Get It',
360+
description: 'Mark Henry enters the ring...',
361+
icon: <ShuffleIcon size={32} weight="duotone" />,
362+
category: 'Secret',
363+
},
364+
{
365+
id: 'fast_eyes',
366+
title: 'Fast Eyes',
367+
description: 'Shut and open the eyes quickly.',
368+
icon: <ShuffleIcon size={32} weight="duotone" />,
369+
category: 'Secret',
370+
},
371+
{
372+
id: 'and_heartbreak',
373+
title: '& Heartbreak',
374+
description: 'And my head keeps spinning.',
375+
icon: <ShuffleIcon size={32} weight="duotone" />,
376+
category: 'Secret',
377+
},
378+
{
379+
id: 'feeling_lucky',
380+
title: 'Feeling Lucky',
381+
description: 'Took a chance on the random button.',
382+
icon: <ShuffleIcon size={32} weight="duotone" />,
383+
category: 'Secret',
384+
},
349385
];

src/pages/apps/RotaryPhonePage.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ const RotaryPhonePage = () => {
5555
'007': 'the_worst_agent',
5656
'314': 'pie',
5757
'12': 'the_number_of_monkeys',
58+
'36': 'some_bodies_gonna_get_it',
59+
'182': 'fast_eyes',
60+
'808': 'and_heartbreak',
5861
}
5962

6063
const handleCall = () => {

0 commit comments

Comments
 (0)