|
|
@@ -1,33 +1,26 @@
|
|
|
-import React from 'react';
|
|
|
+import React, { useEffect } from 'react';
|
|
|
+import PropTypes from 'prop-types';
|
|
|
|
|
|
-/**
|
|
|
- *
|
|
|
- * @export
|
|
|
- * @extends {React.Component}
|
|
|
- */
|
|
|
+const ShowShortcutsModal = (props) => {
|
|
|
|
|
|
-export default class ShowHotkeys extends React.Component {
|
|
|
+ // setup effect
|
|
|
+ useEffect(() => {
|
|
|
+ // show modal to create a page
|
|
|
+ $('#shortcuts-modal').modal('toggle');
|
|
|
|
|
|
- // when this is called it returns the hotkey stroke
|
|
|
- static getHotkeyStroke() {
|
|
|
- return [['/+ctrl'], ['/+meta']];
|
|
|
- }
|
|
|
+ // remove this
|
|
|
+ props.onDeleteRender(this);
|
|
|
+ }, [props]);
|
|
|
|
|
|
- static getComponent() {
|
|
|
- return <ShowHotkeys />;
|
|
|
- }
|
|
|
+ return <></>;
|
|
|
+};
|
|
|
|
|
|
- componentDidMount() {
|
|
|
- // show modal to create a page
|
|
|
- $('#shortcuts-modal').modal('toggle');
|
|
|
- return null;
|
|
|
- }
|
|
|
+ShowShortcutsModal.propTypes = {
|
|
|
+ onDeleteRender: PropTypes.func.isRequired,
|
|
|
+};
|
|
|
|
|
|
- render() {
|
|
|
- return (
|
|
|
- <React.Fragment>
|
|
|
- </React.Fragment>
|
|
|
- );
|
|
|
- }
|
|
|
+ShowShortcutsModal.getHotkeyStrokes = () => {
|
|
|
+ return [['/+ctrl'], ['/+meta']];
|
|
|
+};
|
|
|
|
|
|
-}
|
|
|
+export default ShowShortcutsModal;
|