diff --git a/app/soapbox/features/ui/components/hotkeys_modal.js b/app/soapbox/features/ui/components/hotkeys_modal.js deleted file mode 100644 index 08dd211993..0000000000 Binary files a/app/soapbox/features/ui/components/hotkeys_modal.js and /dev/null differ diff --git a/app/soapbox/features/ui/components/hotkeys_modal.tsx b/app/soapbox/features/ui/components/hotkeys_modal.tsx new file mode 100644 index 0000000000..50845ea59e --- /dev/null +++ b/app/soapbox/features/ui/components/hotkeys_modal.tsx @@ -0,0 +1,159 @@ +import React from 'react'; +import { FormattedMessage } from 'react-intl'; + +import { Modal } from 'soapbox/components/ui'; +import { useAppSelector } from 'soapbox/hooks'; +import { getFeatures } from 'soapbox/utils/features'; + +interface IHotkeysModal { + onClose: () => void, +} + +const HotkeysModal: React.FC = ({ onClose }) => { + const features = useAppSelector((state) => getFeatures(state.instance)); + + return ( + } + onClose={onClose} + > +
+ + + + + + + + + + + + + + + + + + + + + + + + {features.emojiReacts && ( + + + + + )} + + + + + + + + + + + + + +
r
m
p
f
e
b
enter, o
a
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
x
h
up, k
down, j
n
alt + n
backspace
s
esc
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
g + h
g + n
g + f
g + p
g + u
g + b
g + m
g + r
?
+
+
+ ); +}; + +export default HotkeysModal;