fix(ui): fix render loop crash, fix team list first letter

This commit is contained in:
sylenien 2022-12-12 13:26:37 +01:00
parent 53bf8eef07
commit dcb4e91e5b
2 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@ function UserListItem(props: Props) {
onClick={editHandler}
>
<div className="col-span-5">
<span className="mr-2">{user.name}</span>
<span className="mr-2 capitalize">{user.name}</span>
{/* {isEnterprise && <AdminPrivilegeLabel user={user} />} */}
</div>
<div className="col-span-3">

View file

@ -19,7 +19,7 @@ export default (BaseComponent) => {
}
componentDidUpdate(prevProps) {
const { urlSiteId, siteId, location: { pathname }, history } = this.props;
const shouldUrlUpdate = urlSiteId && urlSiteId !== siteId;
const shouldUrlUpdate = urlSiteId && parseInt(urlSiteId, 10) !== parseInt(siteId, 10);
if (shouldUrlUpdate) {
const path = ['', siteId].concat(pathname.split('/').slice(2)).join('/');
history.push(path);
@ -37,4 +37,4 @@ export default (BaseComponent) => {
}
return WrapperClass
}
}