This commit is contained in:
Ahmed Bouhuolia
2026-04-03 11:51:34 +02:00
parent dfdbd7af6c
commit 6e04440fbd
8 changed files with 245 additions and 48 deletions

View File

@@ -0,0 +1,22 @@
// @ts-nocheck
import { useRequestQuery } from '../useQueryRequest';
/**
* Retrieve workspaces of the authenticated user.
*/
export function useWorkspaces(props) {
return useRequestQuery(
['workspaces'],
{ method: 'get', url: 'workspaces' },
{
select: (res) => res.data.workspaces,
initialDataUpdatedAt: 0,
initialData: {
data: {
workspaces: [],
},
},
...props,
},
);
}