chore: Update syntax, improve more typing (#1439)

* chore: <React.Fragment> to <>

* flow types
This commit is contained in:
Tom Moor
2020-08-09 09:48:04 -07:00
committed by GitHub
parent ead55442e0
commit e2bd03494d
55 changed files with 239 additions and 221 deletions

View File

@@ -125,7 +125,7 @@ class CollectionMembers extends React.Component<Props> {
return (
<Flex column>
{collection.private ? (
<React.Fragment>
<>
<HelpText>
Choose which groups and team members have access to view and edit
documents in the private <strong>{collection.name}</strong>{" "}
@@ -146,7 +146,7 @@ class CollectionMembers extends React.Component<Props> {
Add groups
</Button>
</span>
</React.Fragment>
</>
) : (
<HelpText>
The <strong>{collection.name}</strong> collection is accessible by
@@ -195,7 +195,7 @@ class CollectionMembers extends React.Component<Props> {
</GroupsWrap>
)}
{collection.private ? (
<React.Fragment>
<>
<span>
<Button
type="button"
@@ -208,7 +208,7 @@ class CollectionMembers extends React.Component<Props> {
</span>
<Subheading>Individual Members</Subheading>
</React.Fragment>
</>
) : (
<Subheading>Members</Subheading>
)}

View File

@@ -30,7 +30,7 @@ const MemberListItem = ({
onRemove={onRemove}
onUpdate={onUpdate}
renderActions={({ openMembersModal }) => (
<React.Fragment>
<>
<Select
label="Permissions"
options={PERMISSIONS}
@@ -51,7 +51,7 @@ const MemberListItem = ({
<DropdownMenuItem onClick={onRemove}>Remove</DropdownMenuItem>
</DropdownMenu>
</ButtonWrap>
</React.Fragment>
</>
)}
/>
);

View File

@@ -37,17 +37,17 @@ const MemberListItem = ({
<ListItem
title={user.name}
subtitle={
<React.Fragment>
<>
{user.lastActiveAt ? (
<React.Fragment>
<>
Active <Time dateTime={user.lastActiveAt} /> ago
</React.Fragment>
</>
) : (
"Never signed in"
)}
{!user.lastActiveAt && <Badge>Invited</Badge>}
{user.isAdmin && <Badge primary={user.isAdmin}>Admin</Badge>}
</React.Fragment>
</>
}
image={<Avatar src={user.avatarUrl} size={40} />}
actions={

View File

@@ -20,17 +20,17 @@ const UserListItem = ({ user, onAdd, canEdit }: Props) => {
title={user.name}
image={<Avatar src={user.avatarUrl} size={40} />}
subtitle={
<React.Fragment>
<>
{user.lastActiveAt ? (
<React.Fragment>
<>
Active <Time dateTime={user.lastActiveAt} /> ago
</React.Fragment>
</>
) : (
"Never signed in"
)}
{!user.lastActiveAt && <Badge>Invited</Badge>}
{user.isAdmin && <Badge primary={user.isAdmin}>Admin</Badge>}
</React.Fragment>
</>
}
actions={
canEdit ? (