mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
first import attempts
This commit is contained in:
parent
8da254ff9b
commit
f7e8da1f1f
9 changed files with 57 additions and 6 deletions
|
@ -6,9 +6,10 @@ import { Fills } from '$components/Fills';
|
|||
import { DEFAULT_LOGO } from '$constants/logos';
|
||||
import { UserLocation } from '$components/UserLocation';
|
||||
import { DEFAULT_USER } from '$constants/auth';
|
||||
import { getGuestToken, checkUserToken } from '$utils/api';
|
||||
import { getGuestToken, checkUserToken, getStoredMap } from '$utils/api';
|
||||
import { storeData, getData } from '$utils/storage';
|
||||
import { UserPanel } from '$components/panels/UserPanel';
|
||||
import { getPath } from '$utils/history';
|
||||
|
||||
export class App extends React.Component {
|
||||
state = {
|
||||
|
@ -25,8 +26,14 @@ export class App extends React.Component {
|
|||
|
||||
componentDidMount() {
|
||||
this.authInit();
|
||||
this.mapInit();
|
||||
}
|
||||
|
||||
mapInit = () => {
|
||||
const path = getPath();
|
||||
if (path) getStoredMap({ name: path, callback: this.editor.setData });
|
||||
};
|
||||
|
||||
setMode = mode => {
|
||||
this.setState({ mode });
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue