Skip to content

Commit

Permalink
feat: updateWorkspace
Browse files Browse the repository at this point in the history
  • Loading branch information
yp969803 committed Jan 20, 2024
1 parent 1647db6 commit dfc2239
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/features/EditWorkspace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { ChangeEvent, useContext, useEffect, useState } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { useQuery } from 'react-query';
import toast from 'react-hot-toast';
import { addOrg, addOrgMembers, getAllOrgs, getOrg } from 'app/api/organization';
import { addOrg, addOrgMembers, getAllOrgs, getOrg, updateOrg } from 'app/api/organization';
import { uploadIcon } from 'app/api/file';

import './index.scss';
Expand Down Expand Up @@ -133,12 +133,13 @@ const EditWorkspace = () => {
description &&
token &&
name &&
spaceName&&
validName &&
uniqueName &&
validDescription
) {
const func = async (): Promise<void> => {
const dataRes = await addOrg(token, {
const dataRes = await updateOrg(token,spaceName, {
name: name,
description: description,
});
Expand Down Expand Up @@ -195,7 +196,7 @@ const EditWorkspace = () => {
/>
{!name ? <p>Name feild should not be empty</p> : <></>}
{name!=spaceName&&!validName && name ? <p>Not a valid name</p> : <></>}
{!uniqueName && name ? (
{name!=spaceName && !uniqueName && name ? (
<p>Name already taken. Try another name</p>
) : (
<></>
Expand Down
3 changes: 2 additions & 1 deletion src/features/workspace-view/workspace-card/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@

position: absolute;
width: 111px;
// height: 150px q;
height: fit-content !important;

background: rgba(26, 26, 57, 0.5);
background:black;
border: 1px solid #402aa4;
backdrop-filter: blur(2px);
/* Note: backdrop-filter has minimal browser support */
Expand Down

0 comments on commit dfc2239

Please sign in to comment.