UserLayout.js 1.69 KB
Newer Older
้™ˆๅธ…'s avatar
้™ˆๅธ… committed
1
import React, { Fragment } from 'react';
xiaohu's avatar
xiaohu committed
2
import { Link } from 'dva/router';
3
import { Icon } from 'antd';
4
import GlobalFooter from '../components/GlobalFooter/index';
5
import styles from './UserLayout.less';
6
import logo from '../assets/logo.svg';
xiaohu's avatar
xiaohu committed
7

jim's avatar
jim committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
const links = [
  {
    key: 'help',
    title: 'ๅธฎๅŠฉ',
    href: '',
  },
  {
    key: 'privacy',
    title: '้š็ง',
    href: '',
  },
  {
    key: 'terms',
    title: 'ๆกๆฌพ',
    href: '',
  },
];
25

jim's avatar
jim committed
26 27 28 29 30
const copyright = (
  <Fragment>
    Copyright <Icon type="copyright" /> 2018 ่š‚่š้‡‘ๆœไฝ“้ชŒๆŠ€ๆœฏ้ƒจๅ‡บๅ“
  </Fragment>
);
31

32
class UserLayout extends React.PureComponent {
้™ˆๅธ…'s avatar
้™ˆๅธ… committed
33
  // @TODO title
34 35 36 37 38 39 40 41 42
  // getPageTitle() {
  //   const { routerData, location } = this.props;
  //   const { pathname } = location;
  //   let title = 'Ant Design Pro';
  //   if (routerData[pathname] && routerData[pathname].name) {
  //     title = `${routerData[pathname].name} - Ant Design Pro`;
  //   }
  //   return title;
  // }
้™ˆๅธ…'s avatar
้™ˆๅธ… committed
43

44
  render() {
xiaohu's avatar
xiaohu committed
45
    const { children } = this.props;
46
    return (
้™ˆๅธ…'s avatar
้™ˆๅธ… committed
47
      // @TODO <DocumentTitle title={this.getPageTitle()}>
48 49 50 51 52 53 54 55
      <div className={styles.container}>
        <div className={styles.content}>
          <div className={styles.top}>
            <div className={styles.header}>
              <Link to="/">
                <img alt="logo" className={styles.logo} src={logo} />
                <span className={styles.title}>Ant Design</span>
              </Link>
56
            </div>
57 58 59
            <div className={styles.desc}>Ant Design ๆ˜ฏ่ฅฟๆน–ๅŒบๆœ€ๅ…ทๅฝฑๅ“ๅŠ›็š„ Web ่ฎพ่ฎก่ง„่Œƒ</div>
          </div>
          {children}
60
        </div>
61 62
        <GlobalFooter links={links} copyright={copyright} />
      </div>
63 64 65 66 67
    );
  }
}

export default UserLayout;