import React from 'react';
import Taro from '@tarojs/taro';
import { Image } from '@tarojs/components';
import { ROLE_CITIZEN } from '@/utils/user';

const style = {
  width: 'calc(100% - var(--main-space) * 2)',
  margin: 'var(--main-space)',
  borderRadius: '6px',
  overfollow: 'hidden',
}

export default (props) => { 
  
  const { duty } = props;
  
  return !duty || duty == ROLE_CITIZEN ? (
    // eslint-disable-next-line no-undef
    <Image mode="widthFix" src={AD_IMAGE} style={style}></Image>
  ) : null;
}
