Skip to content

Commit

Permalink
feat: wiki shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
libra-co committed Jun 17, 2024
1 parent e517ac0 commit b216db1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion frontend/src/components/dialog/add-wiki-page-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class AddWikiPageDialog extends React.Component {

handleSubmit = () => {
if (!this.state.isSubmitBtnActive) return;

// first param set false to prevent redirect to new page
this.props.onAddPage(false, this.state.wikiPageName);
this.props.handleClose();
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/pages/wiki2/main-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Utils } from '../../utils/utils';
import Account from '../../components/common/account';
import WikiTopNav from './top-nav';
import { getCurrentPageConfig } from './utils';
import WikiExternalOperations from './wiki-external-operations';

const propTypes = {
path: PropTypes.string.isRequired,
Expand All @@ -21,6 +22,7 @@ const propTypes = {
config: PropTypes.object,
currentPageId: PropTypes.string,
onUpdatePage: PropTypes.func,
onAddWikiPage: PropTypes.func,
};

class MainPanel extends Component {
Expand Down Expand Up @@ -65,7 +67,7 @@ class MainPanel extends Component {
};

render() {
const { permission, pathExist, isDataLoading, isViewFile, config } = this.props;
const { permission, pathExist, isDataLoading, isViewFile, config, onAddWikiPage } = this.props;
const { currentPageConfig = {}, } = this.state;
const isViewingFile = pathExist && !isDataLoading && isViewFile;
const isReadOnly = !(permission === 'rw');
Expand Down

0 comments on commit b216db1

Please sign in to comment.