Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as React from 'react'
import { Button, Page } from 'decentraland-ui'
import { t } from 'decentraland-dapps/dist/modules/translation/utils'
import { getAnalytics } from 'decentraland-dapps/dist/modules/analytics/utils'
import { IntercomWidget } from 'decentraland-dapps/dist/components/Intercom/IntercomWidget'
import Navbar from 'components/Navbar'
import Footer from 'components/Footer'
import { Props } from './ErrorPage.types'
import './ErrorPage.css'
const widget = IntercomWidget.getInstance()
export default class ErrorPage extends React.PureComponent {
analytics = getAnalytics()
componentDidMount() {
document.body.classList.add('error-body')
this.analytics.track('Error page', {})
}
componentWillUnmount() {
document.body.classList.remove('error-body')
}
handleOnClick = () => {
const { stackTrace } = this.props
const lines = stackTrace.split('\n')
import * as React from 'react'
import { IntercomWidget } from 'decentraland-dapps/dist/components/Intercom/IntercomWidget'
import Icon from 'components/Icon'
import Preview from 'components/Preview'
import './ViewPort.css'
import { Props } from './ViewPort.types'
const widget = IntercomWidget.getInstance()
export default class ViewPort extends React.PureComponent {
handleClose = () => {
const { onClosePreview } = this.props
widget.render()
onClosePreview()
}
render() {
const { isPreviewing, isReadOnly, type } = this.props
return (
<>
{isPreviewing ? (
<div>
</div>
import DeploymentStatus from 'components/DeploymentStatus'
import ShortcutTooltip from 'components/ShortcutTooltip'
import Chip from 'components/Chip'
import OwnIcon from 'components/Icon'
import DeployButton from 'components/DeployButton'
import DeployContestButton from 'components/DeployContestButton'
import ShareButton from 'components/ShareButton'
import { locations } from 'routing/locations'
import { Gizmo } from 'modules/editor/types'
import { Shortcut } from 'modules/keyboard/types'
import { Props } from './TopBar.types'
import './TopBar.css'
const widget = IntercomWidget.getInstance()
export default class TopBar extends React.PureComponent {
handleMoveMode = () => {
const { gizmo, onSetGizmo } = this.props
onSetGizmo(gizmo === Gizmo.MOVE ? Gizmo.NONE : Gizmo.MOVE)
}
handleRotateMode = () => {
const { gizmo, onSetGizmo } = this.props
onSetGizmo(gizmo === Gizmo.ROTATE ? Gizmo.NONE : Gizmo.ROTATE)
}
handleScaleMode = () => {
const { gizmo, onSetGizmo } = this.props
onSetGizmo(gizmo === Gizmo.SCALE ? Gizmo.NONE : Gizmo.SCALE)
}