import React, {Component} from 'react';

export default class City extends Component {
    static propTypes = {
        name: React.PropTypes.string
    }

    constructor(props) {
        super(props);
    }

    render() {
        const { name } = this.props;

        if (name) {
            return (
                <div className="city">{this.props.name}</div>
            );
        }

        return (
            <div className="city">No city selected</div>
        )
    }
}
