Removed useless loging
This commit is contained in:
@@ -27,7 +27,7 @@ class Navbar extends React.Component<Props, State> {
|
||||
logout = () => {
|
||||
this.props.logout();
|
||||
localStorage.removeItem('user');
|
||||
userLogout().then(console.log).catch(console.error);
|
||||
userLogout().then();
|
||||
};
|
||||
|
||||
changeSize = () => {
|
||||
|
||||
@@ -69,8 +69,6 @@ class Novel extends React.Component<Props, State> {
|
||||
const { match: { params: { novelId } } } = this.props;
|
||||
postNovelComment(novelId, text).then((comment: CommentType) => {
|
||||
const { comments } = this.state;
|
||||
console.log(comment)
|
||||
console.log(Object.assign({}, comments, { comment }));
|
||||
this.setState({ comments: [comment, ...comments] });
|
||||
}).catch(console.error);
|
||||
};
|
||||
|
||||
@@ -12,20 +12,16 @@ type Props = {
|
||||
mark?: number
|
||||
}
|
||||
|
||||
const NovelItem = ({ id, original_name, localized_name, image, status, mark }: Props) => {
|
||||
console.log(mark !== undefined && mark > 0 && <div>{mark}</div>)
|
||||
|
||||
return (
|
||||
<Link to={`/novels/${id}`} className="NovelItem">
|
||||
<div className='NovelItem__Image' style={{ backgroundImage: `url(${image || '/static/img/no-image.png'})` }}/>
|
||||
<div className="NovelItem__Title">
|
||||
{localized_name || original_name}
|
||||
</div>
|
||||
{status && <div className="NovelItem__Status">
|
||||
{TranslateStatus[status]} {mark !== undefined && mark > 0 && mark}
|
||||
</div>}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
const NovelItem = ({ id, original_name, localized_name, image, status, mark }: Props) => (
|
||||
<Link to={`/novels/${id}`} className="NovelItem">
|
||||
<div className='NovelItem__Image' style={{ backgroundImage: `url(${image || '/static/img/no-image.png'})` }}/>
|
||||
<div className="NovelItem__Title">
|
||||
{localized_name || original_name}
|
||||
</div>
|
||||
{status && <div className="NovelItem__Status">
|
||||
{TranslateStatus[status]} {mark !== undefined && mark > 0 && mark}
|
||||
</div>}
|
||||
</Link>
|
||||
);
|
||||
|
||||
export default NovelItem;
|
||||
@@ -27,17 +27,13 @@ class User extends React.Component<Props, State> {
|
||||
const params = this.props.match.params;
|
||||
|
||||
fetchUser(parseInt(params.userId)).then((user: UserType) => {
|
||||
console.log(user)
|
||||
this.setState({ user });
|
||||
document.title = `${user.username} / Unmei`;
|
||||
|
||||
fetchUserNovels(parseInt(params.userId)).then((novels: NovelType[]) => {
|
||||
this.setState({ novels });
|
||||
}).catch((err: ApiError) => console.error(err));
|
||||
}).catch((err: ApiError) => {
|
||||
this.setState({ errorCode: err.code })
|
||||
console.log(err)
|
||||
});
|
||||
}).catch((err: ApiError) => this.setState({ errorCode: err.code }));
|
||||
}
|
||||
|
||||
sendActivateLink = () => {
|
||||
|
||||
Reference in New Issue
Block a user