import React from 'react';
import { formatMessage } from 'umi-plugin-locale';
import Label from '@/components/Label';

import styles from './style.less';

const AdCard: React.FC = () => (
  <section className={styles.adcard}>
    <code>// TODO</code>
  </section>
);

const HomePage: React.FC = () => {
  const header = (
    <div className={styles.header}>
      <span className="title">{formatMessage({ id: 'home.home.statistic' })}</span>
      <span className="label">
        1000
        <span className="unit">LOG</span>
      </span>
    </div>
  );

  return (
    <div className={styles.container}>
      {header}
      <div className={styles.body}>
        <AdCard />

        <Label name={formatMessage({ id: 'home.home.header' })} />
      </div>
    </div>
  );
}

export default HomePage;
