Commit 8297515f authored by Scarlett Perry's avatar Scarlett Perry
Browse files

lint

No related merge requests found
Showing with 43 additions and 41 deletions
+43 -41
......@@ -153,51 +153,53 @@ const ProjectGroup: React.FC<ProjectGroupProps> = ({ title, group, displayToggle
{numProjects === 0 && (
<StyledNoProjectsText>No projects in this group yet.</StyledNoProjectsText>
)}
{Object.keys(state[group]).sort().map(key => (
<StyledMenuItem key={key}>
<Checkbox
name={key}
size="small"
disabled={state.loading}
onChange={() =>
dispatch({
type: "TOGGLE_PROJECTS",
payload: { group, projects: [key] },
})
}
checked={!!state[group][key].checked}
/>
<StyledMenuItemName>{key}</StyledMenuItemName>
<StyledHoverOptions hidden>
<StyledOnlyButton
onClick={() =>
!state.loading &&
{Object.keys(state[group])
.sort()
.map(key => (
<StyledMenuItem key={key}>
<Checkbox
name={key}
size="small"
disabled={state.loading}
onChange={() =>
dispatch({
type: "ONLY_PROJECTS",
type: "TOGGLE_PROJECTS",
payload: { group, projects: [key] },
})
}
>
Only
</StyledOnlyButton>
<StyledClearIcon>
{state[group][key].custom && (
<IconButton
onClick={() =>
!state.loading &&
dispatch({
type: "REMOVE_PROJECTS",
payload: { group, projects: [key] },
})
}
>
<ClearIcon />
</IconButton>
)}
</StyledClearIcon>
</StyledHoverOptions>
</StyledMenuItem>
))}
checked={!!state[group][key].checked}
/>
<StyledMenuItemName>{key}</StyledMenuItemName>
<StyledHoverOptions hidden>
<StyledOnlyButton
onClick={() =>
!state.loading &&
dispatch({
type: "ONLY_PROJECTS",
payload: { group, projects: [key] },
})
}
>
Only
</StyledOnlyButton>
<StyledClearIcon>
{state[group][key].custom && (
<IconButton
onClick={() =>
!state.loading &&
dispatch({
type: "REMOVE_PROJECTS",
payload: { group, projects: [key] },
})
}
>
<ClearIcon />
</IconButton>
)}
</StyledClearIcon>
</StyledHoverOptions>
</StyledMenuItem>
))}
</div>
)}
</>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment