From f0b146e5fcd070ec101ebb38a3ddcc13964dd593 Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Thu, 23 May 2019 15:26:13 -0600 Subject: [PATCH] Remove messages from initialize; chenge when token login happens --- src/index.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/index.js b/src/index.js index 669f53a..bd7b95d 100644 --- a/src/index.js +++ b/src/index.js @@ -2,24 +2,22 @@ import './main.scss'; import setupListeners from './js/setupListeners'; import { renderAll } from './js/render'; -import { generateRandomWords, addMessage, hasToken } from './js/utilities'; +import { hasToken } from './js/utilities'; import { loadDictionary } from './js/dictionaryManagement'; import { loadSettings } from './js/settings'; function initialize() { - addMessage('Loading...'); + loadDictionary(); + loadSettings(); + setupListeners(); + if (hasToken()) { import('./js/account/index.js').then(account => { account.loginWithToken(); }); } - loadDictionary(); - loadSettings(); - // generateRandomWords(100); - setupListeners(); + renderAll(); - addMessage('Done Loading!'); - // console.log('Rendered!'); } window.onload = (function (oldLoad) {