wewechat++ init
仓库提交至星火社区作品集 Signed-off-by: Riceneeder <86492950+Riceneeder@users.noreply.github.com>
This commit is contained in:
27
src/js/pages/Header/index.js
Normal file
27
src/js/pages/Header/index.js
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import classes from './style.css';
|
||||
|
||||
export default class Header extends Component {
|
||||
getTitle() {
|
||||
switch (this.props.location.pathname) {
|
||||
case '/contacts':
|
||||
return 'Contacts - WeWeChat';
|
||||
|
||||
case '/settings':
|
||||
return 'Settings - WeWeChat';
|
||||
|
||||
default:
|
||||
return 'WeWeChat';
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<header className={classes.container}>
|
||||
<h1>{this.getTitle()}</h1>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user