mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Convert Mascot component to use JSX (#7535)
This commit is contained in:
parent
c51914c1a5
commit
439fce8901
@ -1,6 +1,5 @@
|
|||||||
|
import React, { Component } from 'react'
|
||||||
const inherits = require('util').inherits
|
const inherits = require('util').inherits
|
||||||
const Component = require('react').Component
|
|
||||||
const h = require('react-hyperscript')
|
|
||||||
const metamaskLogo = require('metamask-logo')
|
const metamaskLogo = require('metamask-logo')
|
||||||
const debounce = require('debounce')
|
const debounce = require('debounce')
|
||||||
|
|
||||||
@ -20,15 +19,17 @@ function Mascot ({width = '200', height = '200'}) {
|
|||||||
this.unfollowMouse = this.logo.setFollowMouse.bind(this.logo, false)
|
this.unfollowMouse = this.logo.setFollowMouse.bind(this.logo, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
Mascot.prototype.render = function () {
|
Mascot.prototype.render = function Mascot () {
|
||||||
// this is a bit hacky
|
// this is a bit hacky
|
||||||
// the event emitter is on `this.props`
|
// the event emitter is on `this.props`
|
||||||
// and we dont get that until render
|
// and we dont get that until render
|
||||||
this.handleAnimationEvents()
|
this.handleAnimationEvents()
|
||||||
|
return (
|
||||||
return h('#metamask-mascot-container', {
|
<div
|
||||||
style: { zIndex: 0 },
|
id="metamask-mascot-container"
|
||||||
})
|
style={{ zIndex: 0 }}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Mascot.prototype.componentDidMount = function () {
|
Mascot.prototype.componentDidMount = function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user