feat: removed last bit of workspace in frontend. Fatality!

This commit is contained in:
=
2025-09-16 00:08:41 +05:30
parent 37a80fa1ac
commit ac80242749
356 changed files with 1788 additions and 1890 deletions
@@ -9,9 +9,9 @@ import { useOrganization } from "@app/context";
import {
useAddUserToWsNonE2EE,
useGetOrgMembershipProjectMemberships,
useGetUserWorkspaces
useGetUserProjects
} from "@app/hooks/api";
import { ProjectVersion } from "@app/hooks/api/workspace/types";
import { ProjectVersion } from "@app/hooks/api/projects/types";
import { UsePopUpState } from "@app/hooks/usePopUp";
const schema = z
@@ -34,7 +34,7 @@ type Props = {
const UserAddToProjectModalChild = ({ membershipId, popUp, handlePopUpToggle }: Props) => {
const { currentOrg } = useOrganization();
const orgId = currentOrg?.id || "";
const { data: workspaces = [] } = useGetUserWorkspaces();
const { data: workspaces = [] } = useGetUserProjects();
const { mutateAsync: addUserToWorkspaceNonE2EE } = useAddUserToWsNonE2EE();
@@ -7,7 +7,7 @@ import { createNotification } from "@app/components/notifications";
import { IconButton, Td, Tooltip, Tr } from "@app/components/v2";
import { getProjectBaseURL } from "@app/helpers/project";
import { formatProjectRoleName } from "@app/helpers/roles";
import { useGetUserWorkspaces } from "@app/hooks/api";
import { useGetUserProjects } from "@app/hooks/api";
import { TWorkspaceUser } from "@app/hooks/api/types";
import { UsePopUpState } from "@app/hooks/usePopUp";
import { OrgAccessControlTabSections } from "@app/types/org";
@@ -24,7 +24,7 @@ export const UserProjectRow = ({
membership: { id, project, user, roles },
handlePopUpOpen
}: Props) => {
const { data: workspaces = [] } = useGetUserWorkspaces();
const { data: workspaces = [] } = useGetUserProjects();
const navigate = useNavigate();
const isAccessible = useMemo(() => {
@@ -32,7 +32,7 @@ export const UserProjectsSection = ({ membershipId }: Props) => {
const handleRemoveUser = async (projectId: string, username: string) => {
try {
await removeUserFromWorkspace({ workspaceId: projectId, usernames: [username], orgId });
await removeUserFromWorkspace({ projectId, usernames: [username], orgId });
createNotification({
text: "Successfully removed user from project",
type: "success"