From 4756a959e8aea5c67e8ea695cd23f69ebf370237 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Wed, 29 Apr 2026 13:21:22 +0300 Subject: [PATCH] code style improvements --- src/App/App.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/App/App.js b/src/App/App.js index 732e948d7..eecca48ea 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -45,11 +45,13 @@ const App = () => { const [gamepadModalOpen,, closeGamepadModal, toggleGamepadModal] = useBinaryState(false); const onShortcut = React.useCallback((name) => { - if (name === 'shortcuts') { - toggleShortcutModal(); - } - if (name === 'gamepadGuide') { - toggleGamepadModal(); + switch (name) { + case 'shortcuts': + toggleShortcutModal(); + break; + case 'gamepadGuide': + toggleGamepadModal(); + break; } }, [toggleShortcutModal, toggleGamepadModal]);