import React from 'react';
import { View, Image } from '@tarojs/components';
import pt from '@/plain-text';
import wechatUser from '@/wechat';

export default class MemberTitleCard extends React.Component {
  render(): React.ReactNode {
    const memberPage = pt.get().memberPage;
    return (
      <View className='at-row at-row__align--end'>
        <View className='at-col at-col-1 at-col--auto'>
          <Image
            style='width: 150rpx; height: 150rpx; margin-left: 60rpx;'
            src={wechatUser.getInfo().avatar}
            mode='aspectFit'
          />
        </View>
        <View className='page-title' style={{ marginLeft: '30rpx' }}>
          <View className='at-article__h1' style={{ fontWeight: 'bold' }}>
            {memberPage.mainTitleLine + wechatUser.getInfo().name}
          </View>
          <View className='at-article__h2'>{memberPage.subTitleLine}</View>
        </View>
      </View>
    );
  }
}
