import { connect } from 'dva' ; import React from 'react' ; import { RootState , User } from 'state-typings' ; import styles from './styles.less' ; export const TopImg = connect ( ( { user } ) => ( { user , } ) ) ( ( { user } ) => { const { image } = user ?. pageConfig || { } ; return < img key = { image } alt = "image" className = { styles . layoutBg } src = { image } / > ; } ) ;