Skip to main content

Overview

useFetchUserSpaces returns a callable function that fetches all spaces where the authenticated user has an active membership. The response includes membership metadata alongside each space.

Usage Example

Parameters

string
Membership status to list: "active" (default), "pending", or "banned". Use "pending" to show join requests still awaiting approval.
number
Page number. Defaults to 1.
number
Number of results per page.

Returns

UserSpaceItem[]
Each item contains a space (Space) and a membership object with membershipId, role, status, and joinedAt.
object
Standard pagination metadata.