增加个人主页和项目的title设置

This commit is contained in:
何童崇 2022-11-14 09:54:52 +08:00
parent c2bb54738a
commit 45247e6a03
2 changed files with 3 additions and 1 deletions

View File

@ -402,7 +402,8 @@ class Detail extends Component {
praises_count: result.data.praises_count,
forked_count: result.data.forked_count,
defaultBranch: result.data.default_branch
})
});
document.title = `${result.data.author.name}/${result.data.name}${result.data.description}`;
}
}
}).catch((error) => { })

View File

@ -147,6 +147,7 @@ class Infos extends Component {
});
const { pathname } = this.props.location;
this.renderPath(pathname,result.data);
document.title = result.data.username+'('+ username +')';
})
.catch((error) => {
this.setState({