Skip to content

Commit

Permalink
chore(clerk-js): Improve types & add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
panteliselef committed Nov 3, 2023
1 parent bf51225 commit 904cd28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const ActiveMembersList = () => {
const MemberRow = (props: {
membership: OrganizationMembershipResource;
onRemove: () => unknown;
options: any;
options: Parameters<typeof RoleSelect>[0]['roles'];
onRoleChange: (role: string) => unknown;
}) => {
const { membership, onRemove, onRoleChange, options } = props;
Expand Down
4 changes: 4 additions & 0 deletions packages/clerk-js/src/ui/hooks/useFetchRoles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { customRoleLocalizationKey, roleLocalizationKey } from '../utils';
import { useFetch } from './useFetch';

const getRolesParams = {
/**
* Fetch at most 20 roles, it is not expected for an app to have more.
* We also prevent the creation of more than 20 roles in dashboard.
*/
pageSize: 20,
};
export const useFetchRoles = () => {
Expand Down

0 comments on commit 904cd28

Please sign in to comment.