fix: project states fixes (#2731)

* fix: project states fixes

* fix: states fixes

* fix: formating all files
This commit is contained in:
sriram veeraghanta
2023-11-08 20:31:46 +05:30
committed by GitHub
parent bd1a850f35
commit 20fb79567f
156 changed files with 1585 additions and 1758 deletions

View File

@@ -76,15 +76,12 @@ export const requiredWorkspaceAdmin = async (workspaceSlug: string, cookie?: str
let memberDetail: IWorkspaceMember | null = null;
try {
const data = await fetch(
`${API_BASE_URL}/api/workspaces/${workspaceSlug}/workspace-members/me/`,
{
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
}
)
const data = await fetch(`${API_BASE_URL}/api/workspaces/${workspaceSlug}/workspace-members/me/`, {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
})
.then((res) => res.json())
.then((data) => data);
@@ -143,9 +140,7 @@ export const homePageRedirect = async (cookie?: string) => {
};
}
const lastActiveWorkspace = workspaces.find(
(workspace) => workspace.id === user.last_workspace_id
);
const lastActiveWorkspace = workspaces.find((workspace) => workspace.id === user.last_workspace_id);
if (lastActiveWorkspace) {
return {