mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Move editor page as component
This commit is contained in:
parent
8fbe901c4d
commit
e0a4049d48
@ -15,7 +15,7 @@ import MapsPage from './components/maps-page';
|
||||
import CssBaseline from '@material-ui/core/CssBaseline';
|
||||
import { ThemeProvider } from '@material-ui/core/styles';
|
||||
import GoogleAnalytics from 'react-ga';
|
||||
import Editor from './components/maps-page/editor';
|
||||
import EditorPage from './components/editor-page';
|
||||
|
||||
// Google Analytics Initialization.
|
||||
GoogleAnalytics.initialize('UA-0000000-0');
|
||||
@ -77,11 +77,11 @@ const App = (): ReactElement => {
|
||||
component={MapsPage}
|
||||
/>
|
||||
<Route exact path="/c/maps/:id/edit">
|
||||
<Editor memoryPersistence={memoryPersistence}
|
||||
<EditorPage memoryPersistence={memoryPersistence}
|
||||
readOnlyMode={readOnlyMode} mapId={mapId} />
|
||||
</Route>
|
||||
<Route exact path="/c/maps/:id/try">
|
||||
<Editor memoryPersistence={memoryPersistence}
|
||||
<EditorPage memoryPersistence={memoryPersistence}
|
||||
readOnlyMode={readOnlyMode} mapId={mapId} />
|
||||
</Route>
|
||||
</Switch>
|
||||
|
@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import ActionDispatcher from '../action-dispatcher';
|
||||
import { ActionType } from '../action-chooser';
|
||||
import ActionDispatcher from '../maps-page/action-dispatcher';
|
||||
import { ActionType } from '../maps-page/action-chooser';
|
||||
import WiseEditor from '@wisemapping/editor';
|
||||
import AppI18n from '../../../classes/app-i18n';
|
||||
import AppI18n from '../../classes/app-i18n';
|
||||
|
||||
export type EditorPropsType = {
|
||||
mapId: number;
|
||||
@ -10,7 +10,7 @@ export type EditorPropsType = {
|
||||
readOnlyMode: boolean;
|
||||
};
|
||||
|
||||
export default function Editor({ mapId, ...props }: EditorPropsType): React.ReactElement {
|
||||
const EditorPage = ({ mapId, ...props }: EditorPropsType): React.ReactElement => {
|
||||
const [activeDialog, setActiveDialog] = React.useState<ActionType | null>(null);
|
||||
|
||||
// Load user locale ...
|
||||
@ -31,3 +31,5 @@ export default function Editor({ mapId, ...props }: EditorPropsType): React.Reac
|
||||
</>
|
||||
}
|
||||
|
||||
export default EditorPage;
|
||||
|
Loading…
Reference in New Issue
Block a user