mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-27 04:46:10 +01:00
35 lines
852 B
JavaScript
35 lines
852 B
JavaScript
const Component = require('react').Component
|
|
const h = require('react-hyperscript')
|
|
const inherits = require('util').inherits
|
|
const AccountAndTransactionDetails = require('./account-and-transaction-details')
|
|
|
|
module.exports = MainContainer
|
|
|
|
inherits(MainContainer, Component)
|
|
function MainContainer () {
|
|
Component.call(this)
|
|
}
|
|
|
|
MainContainer.prototype.render = function () {
|
|
// 3. summarize:
|
|
// switch statement goes inside MainContainer,
|
|
// or a method in renderPrimary
|
|
// - pass resulting h() to MainContainer
|
|
// - error checking in separate func
|
|
// - router in separate func
|
|
let contents = {
|
|
component: AccountAndTransactionDetails,
|
|
key: 'account-detail',
|
|
style: {},
|
|
}
|
|
|
|
return h('div.main-container', {
|
|
style: contents.style,
|
|
}, [
|
|
h(contents.component, {
|
|
key: contents.key,
|
|
}, []),
|
|
])
|
|
}
|
|
|