Skip to content

Commit

Permalink
Remove useMemo
Browse files Browse the repository at this point in the history
  • Loading branch information
avatus committed Jan 3, 2025
1 parent b2f1963 commit 12a8563
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,8 @@ export function SelectResource({ onSelect }: SelectResourceProps) {

// a user must be able to create tokens AND have access to create at least one
// type of resource in order to be considered eligible to "add resources"
const canAddResources = useMemo(
() => acl.tokens.create && defaultResources.some(r => r.hasAccess),
[acl, defaultResources]
);
const canAddResources =
acl.tokens.create && defaultResources.some(r => r.hasAccess);

const [showApp, setShowApp] = useState(false);

Expand Down

0 comments on commit 12a8563

Please sign in to comment.