diff --git a/frontend/src/components/welcome/welcome.js b/frontend/src/components/welcome/welcome.js index 87eeb5ac1..a444d33e6 100644 --- a/frontend/src/components/welcome/welcome.js +++ b/frontend/src/components/welcome/welcome.js @@ -1,4 +1,4 @@ -import React, { Component } from 'react' +import React, { useRef } from 'react' import PropTypes from 'prop-types' import 'typeface-roboto' import { @@ -10,26 +10,15 @@ import { ListItemText, ListItemIcon, Avatar, - Container + Container, } from '@material-ui/core' - -import { - AccountBalanceWallet, - Work, - Apps, - Assignment, - GroupWork -} from '@material-ui/icons' - +import { AccountBalanceWallet, Work, Apps, Assignment, GroupWork } from '@material-ui/icons' import './mailchimp.css' - import { injectIntl, FormattedMessage } from 'react-intl' - import TopBarContainer from '../../containers/topbar' import Bottom from '../../components/bottom/bottom' import messages from './messages' import mainStyles from '../styles/style' - const freelancerImage = require('../../images/collections/collection-flat-community.svg') const companiesImage = require('../../images/collections/collection-flat-companies.svg') const teamImage = require('../../images/welcome-teamwork.png') @@ -43,243 +32,239 @@ import { const styles = theme => mainStyles(theme) -class Welcome extends Component { - constructor (props) { - super(props) +const Welcome = (props) => { + const ref = useRef(null) + const [value, setValue] = React.useState(0) - this.state = { - value: 0 - } - } + React.useEffect(() => { + // componentDidMount() equivalent + }, []) - componentDidMount () { - - } - - componentWillUnmount () { - - } + React.useEffect(() => { + // componentWillUnmount() equivalent + return () => { + // Clean up code + } + }, []) - render () { - const { classes } = this.props + const { classes } = props - return ( -