fix: add invitation page (#1395)

This commit is contained in:
Himself65
2023-03-07 16:13:56 -06:00
committed by GitHub
parent d565f71939
commit e90d06edfa
2 changed files with 115 additions and 0 deletions
+9
View File
@@ -51,6 +51,14 @@ export const fetcher = async (
return null;
}
return storage.get(key);
} else if (query[0] === QueryKey.acceptInvite) {
const invitingCode = query[1];
if (typeof invitingCode !== 'string') {
throw new TypeError('invitingCode must be a string');
}
return apis.acceptInviting({
invitingCode,
});
}
} else {
if (query === QueryKey.getWorkspaces) {
@@ -77,6 +85,7 @@ export const fetcher = async (
};
export const QueryKey = {
acceptInvite: 'acceptInvite',
getImage: 'getImage',
getUser: 'getUser',
getWorkspaces: 'getWorkspaces',