diff --git a/client/src/navbar.jsx b/client/src/components/navbar.jsx similarity index 97% rename from client/src/navbar.jsx rename to client/src/components/navbar.jsx index 5059e653..d45dc8e8 100644 --- a/client/src/navbar.jsx +++ b/client/src/components/navbar.jsx @@ -1,5 +1,4 @@ const preact = require('preact'); -const jdenticon = require('jdenticon'); // components all the way down const Icon = name => ( diff --git a/client/src/main.jsx b/client/src/main.jsx index 8d1058ce..975fb51e 100644 --- a/client/src/main.jsx +++ b/client/src/main.jsx @@ -1,4 +1,6 @@ const preact = require('preact'); +const jdenticon = require('jdenticon'); + const { Provider } = require('preact-redux'); const { createStore, combineReducers } = require('redux'); @@ -7,19 +9,24 @@ const fizzyText = require('../lib/fizzy-text'); const createSocket = require('./socket'); const StatusContainer = require('./components/status.container'); +const Navbar = require('./components/navbar'); -{/*-- Section for html render classes --*/} -const Navbar = require('./navbar'); - +// Redux Store const store = createStore( combineReducers({ account: reducers.accountReducer, }), ); +store.subscribe(() => console.log(store.getState())); + const ws = createSocket(store); -store.subscribe(() => console.log(store.getState())); +// tells jdenticon to look for new svgs and render them +// so we don't have to setInnerHtml or manually call update +jdenticon.config = { + replaceMode: 'observe', +}; const Cryps = () => ( @@ -40,4 +47,3 @@ const Main = () => ( preact.render(
, document.body); fizzyText('cryps'); -