Sanity Library Reference Docs
    Preparing search index...

    Interface StudioProjectUsersState

    interface StudioProjectUsersState {
        directory: ProjectUserDirectory<StudioProjectUser> | undefined;
        error: unknown;
        loading: boolean;
        roles: readonly ProjectRole[];
        users: readonly StudioProjectUser[];
    }
    Index

    Properties

    directory: ProjectUserDirectory<StudioProjectUser> | undefined
    error: unknown
    loading: boolean

    True while the directory has not answered, including before its load starts — the fetch begins in a consumer's effect or the first directory lookup, one commit after the first render reads this state. An empty users with loading: false and no error is a confirmed "no members", never a directory nobody has asked for.

    roles: readonly ProjectRole[]

    The project's assignable roles, whether or not anyone holds them. Empty when the read is unavailable — see loadProjectRolesOrNone.

    users: readonly StudioProjectUser[]