From 729e0e46a916d7d9ae2f107bb72b47f7c904d4b7 Mon Sep 17 00:00:00 2001 From: isstuev Date: Mon, 6 Jan 2025 14:54:17 +0100 Subject: [PATCH] Add the text for the CapyRun game --- ui/games/CapybaraRunner.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/games/CapybaraRunner.tsx b/ui/games/CapybaraRunner.tsx index dc23d40de2..11d01405b6 100644 --- a/ui/games/CapybaraRunner.tsx +++ b/ui/games/CapybaraRunner.tsx @@ -4,12 +4,14 @@ import Script from 'next/script'; import React from 'react'; import config from 'configs/app'; - +import useIsMobile from 'lib/hooks/useIsMobile'; const easterEggBadgeFeature = config.features.easterEggBadge; const CapybaraRunner = () => { const [ hasReachedHighScore, setHasReachedHighScore ] = React.useState(false); + const isMobile = useIsMobile(); + React.useEffect(() => { const preventDefaultKeys = (e: KeyboardEvent) => { if (e.code === 'Space' || e.code === 'ArrowUp' || e.code === 'ArrowDown') { @@ -32,6 +34,8 @@ const CapybaraRunner = () => { return ( <> + Score 1000 to win a special prize! + { isMobile ? 'Tap below to start' : 'Press space to start' }