Skip to content

Commit

Permalink
Use safer toggle set lambda for setShowSites
Browse files Browse the repository at this point in the history
CORL-1365
  • Loading branch information
nick-funk committed Nov 23, 2020
1 parent f7a207e commit 8027135
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -85,8 +85,8 @@ const UserStatusSitesListContainer: FunctionComponent<Props> = ({
const hasMore = !isRefetching && relay.hasMore();

const toggleShowSites = useCallback(() => {
setShowSites(!showSites);
}, [showSites, setShowSites]);
setShowSites((s) => !s);
}, [setShowSites]);
const onChangeSite = useCallback(
(siteID: string) => () => {
const changed = [...selectedIDsInput.value];
Expand Down

0 comments on commit 8027135

Please sign in to comment.