diff --git a/frontend/public/index.html b/frontend/public/index.html index a9db1db..de43004 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -29,7 +29,6 @@ href="https://fonts.googleapis.com/css?family=Poppins" rel="stylesheet" /> -
Name feild should not be empty
: <>>} + {!name ?Name field should not be empty
: <>>} {name != spaceName && !validName && name ? (Not a valid name
) : ( @@ -197,7 +187,7 @@ const EditWorkspace = () => { onChange={handleDesriptionChange} placeholder='workspace description' /> - {!description ?Description feild should not be empty
: <>>} + {!description ?Description field should not be empty
: <>>} {!validDescription ? (Characters length should be less than 200
) : ( diff --git a/frontend/src/features/ProjectAddMember /index.tsx b/frontend/src/features/ProjectAddMember /index.tsx index b08ff09..0e10397 100644 --- a/frontend/src/features/ProjectAddMember /index.tsx +++ b/frontend/src/features/ProjectAddMember /index.tsx @@ -1,12 +1,9 @@ - -import { ChangeEvent, useContext, useEffect, useState } from 'react'; +import { ChangeEvent, useContext, useEffect, useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; import { AVATAR_API } from 'envConstants'; import { AVATAR_URL } from 'app/constants/api'; import toast from 'react-hot-toast'; -import { - getOrgMembers, -} from 'app/api/organization'; +import { getOrgMembers } from 'app/api/organization'; import './index.scss'; import UserContext from 'app/context/user/userContext'; diff --git a/frontend/src/features/WorkspaceAddMember/index.tsx b/frontend/src/features/WorkspaceAddMember/index.tsx index 0126778..61e14d8 100644 --- a/frontend/src/features/WorkspaceAddMember/index.tsx +++ b/frontend/src/features/WorkspaceAddMember/index.tsx @@ -1,12 +1,8 @@ import { getAllUser, getUser } from 'app/api/user'; -import { ChangeEvent, useContext, useEffect, useState } from 'react'; +import { ChangeEvent, useContext, useEffect, useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; import toast from 'react-hot-toast'; -import { - addOrgMembers, - getOrgMembers, -} from 'app/api/organization'; - +import { addOrgMembers, getOrgMembers } from 'app/api/organization'; import './index.scss'; import UserContext from 'app/context/user/userContext'; diff --git a/frontend/src/features/login/index.tsx b/frontend/src/features/login/index.tsx index 557ccdf..c367022 100644 --- a/frontend/src/features/login/index.tsx +++ b/frontend/src/features/login/index.tsx @@ -1,4 +1,3 @@ - import { CLIENT_ID } from '../../envConstants'; import { useNavigate, useSearchParams } from 'react-router-dom'; import { login } from 'app/api/login'; diff --git a/frontend/src/features/project-members /components/MemberCard.tsx b/frontend/src/features/project-members /components/MemberCard.tsx index 88c24d7..74d3114 100644 --- a/frontend/src/features/project-members /components/MemberCard.tsx +++ b/frontend/src/features/project-members /components/MemberCard.tsx @@ -1,13 +1,9 @@ - import { changeProjectMembersStatus, removeProjectMembers, } from 'app/api/project'; import UserContext from 'app/context/user/userContext'; -import { - ChangeEvent, - useContext, -} from 'react'; +import { ChangeEvent, useContext } from 'react'; import toast from 'react-hot-toast'; const MemberCard = ({ diff --git a/frontend/src/features/project/components/contributorCard/index.tsx b/frontend/src/features/project/components/contributorCard/index.tsx index 0017431..08a1227 100644 --- a/frontend/src/features/project/components/contributorCard/index.tsx +++ b/frontend/src/features/project/components/contributorCard/index.tsx @@ -1,4 +1,3 @@ - import './index.scss'; import contributorPropTypes from 'app/models/contributorPropTypes'; import { AVATAR_API } from 'envConstants'; diff --git a/frontend/src/features/workspace-members /components/MemberCard.tsx b/frontend/src/features/workspace-members /components/MemberCard.tsx index d8b0ac4..236b691 100644 --- a/frontend/src/features/workspace-members /components/MemberCard.tsx +++ b/frontend/src/features/workspace-members /components/MemberCard.tsx @@ -1,9 +1,6 @@ import { changeOrgMembersStatus, removeOrgMembers } from 'app/api/organization'; import UserContext from 'app/context/user/userContext'; -import { - ChangeEvent, - useContext, -} from 'react'; +import { ChangeEvent, useContext } from 'react'; import toast from 'react-hot-toast'; const MemberCard = ({ diff --git a/frontend/src/features/workspace-view/index.tsx b/frontend/src/features/workspace-view/index.tsx index dab79b9..0a2eff4 100644 --- a/frontend/src/features/workspace-view/index.tsx +++ b/frontend/src/features/workspace-view/index.tsx @@ -1,9 +1,9 @@ import SearchBar from 'app/components/search'; -import { useContext, useEffect, useState } from 'react'; +import { useContext, useEffect, useState } from 'react'; import './index.scss'; import WorkspaceCard from './workspace-card'; import UserContext from 'app/context/user/userContext'; -import { UserOrgs, getUserOrgs } from 'app/api/user'; +import { UserOrgs, getUserOrgs } from 'app/api/user'; import loader from '../../app/assets/gifs/loader.gif'; import { useNavigate } from 'react-router-dom'; import { useSelector } from 'react-redux'; @@ -35,12 +35,7 @@ const WorkspaceView = () => { }; useEffect(() => { fetchData(); - }, [ - userContext?.username, - navigate, - searchValue, - - ]); + }, [userContext?.username, navigate, searchValue]); const LogoutHandler = async () => { try { diff --git a/frontend/src/features/workspace-view/workspace-card/index.tsx b/frontend/src/features/workspace-view/workspace-card/index.tsx index 6df44b4..3d62eb5 100644 --- a/frontend/src/features/workspace-view/workspace-card/index.tsx +++ b/frontend/src/features/workspace-view/workspace-card/index.tsx @@ -5,8 +5,7 @@ import { deleteOrg, getOrg, getOrgMembers } from 'app/api/organization'; import { deleteFile, getIcon, getIconName } from 'app/api/file'; import UserContext from 'app/context/user/userContext'; import toast from 'react-hot-toast'; -import { FaBookmark } from "react-icons/fa"; - +import { FaBookmark } from 'react-icons/fa'; import { UserOrgDetails, @@ -28,10 +27,22 @@ interface members { [username: string]: string; } -const WorkspaceCard = ({ workspaceName, role, archeive, bookmark, archeives }: { workspaceName:string, role:string, archeive:boolean, bookmark:boolean, archeives:boolean }) => { +const WorkspaceCard = ({ + workspaceName, + role, + archeive, + bookmark, + archeives, +}: { + workspaceName: string; + role: string; + archeive: boolean; + bookmark: boolean; + archeives: boolean; +}) => { // const { workspaceName, role, archeive, bookmark, archeives } = props; - const [localArchive,setLocalArchive] = useState(archeive) - const [localBookmark,setLocalBookmark] = useState(bookmark) + const [localArchive, setLocalArchive] = useState(archeive); + const [localBookmark, setLocalBookmark] = useState(bookmark); const [description, setDescription] = useState{project ? project.description : <>>}
{(userContext?.userOrgs?.userOrgs[orgName].role === 'admin' || userContext?.userOrgs?.userOrgs[orgName].role === 'manager') && ( -