Remove messages from initialize; chenge when token login happens
This commit is contained in:
parent
e2c3709ab8
commit
f0b146e5fc
14
src/index.js
14
src/index.js
|
@ -2,24 +2,22 @@ import './main.scss';
|
||||||
|
|
||||||
import setupListeners from './js/setupListeners';
|
import setupListeners from './js/setupListeners';
|
||||||
import { renderAll } from './js/render';
|
import { renderAll } from './js/render';
|
||||||
import { generateRandomWords, addMessage, hasToken } from './js/utilities';
|
import { hasToken } from './js/utilities';
|
||||||
import { loadDictionary } from './js/dictionaryManagement';
|
import { loadDictionary } from './js/dictionaryManagement';
|
||||||
import { loadSettings } from './js/settings';
|
import { loadSettings } from './js/settings';
|
||||||
|
|
||||||
function initialize() {
|
function initialize() {
|
||||||
addMessage('Loading...');
|
loadDictionary();
|
||||||
|
loadSettings();
|
||||||
|
setupListeners();
|
||||||
|
|
||||||
if (hasToken()) {
|
if (hasToken()) {
|
||||||
import('./js/account/index.js').then(account => {
|
import('./js/account/index.js').then(account => {
|
||||||
account.loginWithToken();
|
account.loginWithToken();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
loadDictionary();
|
|
||||||
loadSettings();
|
|
||||||
// generateRandomWords(100);
|
|
||||||
setupListeners();
|
|
||||||
renderAll();
|
renderAll();
|
||||||
addMessage('Done Loading!');
|
|
||||||
// console.log('Rendered!');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = (function (oldLoad) {
|
window.onload = (function (oldLoad) {
|
||||||
|
|
Loading…
Reference in New Issue