Skip to content

Commit

Permalink
bfix: archive bookmark
Browse files Browse the repository at this point in the history
  • Loading branch information
yp969803 committed Feb 14, 2024
1 parent d38a4a7 commit 4c6eaef
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/app/api/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface UserOrgDetails {
[key: string]: {
bookmark: string;
role: string;
archive: string;
archeive: string;
};
}

Expand Down
1 change: 0 additions & 1 deletion src/app/components/timeRangeSwitch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const TimeRangeSwitch: React.FC<Props> = ({ weekly, setWeekly }) => {
// const dispatch = useDispatch();
// const isWeekly = useSelector((state: timeRangeModel) => state.isWeekly.value);
useEffect(()=>{
console.log(weekly)
},[weekly, setWeekly])
return (
<div className='timerange-cont'>
Expand Down
2 changes: 1 addition & 1 deletion src/features/project-members /components/MemberCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const MemberCard = ({


const func= async()=>{
console.log({[name]:new_role})

const res= await changeProjectMembersStatus(token,projectName ,spaceName,{[name]:new_role})
projectMembers[name]=new_role
setProjectMembers(projectMembers)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { useNavigate } from "react-router-dom";

const BackNavigation = () => {
// const clickBack = () => {
// console.log('Back button clicked');
// };

const navigate= useNavigate()
return (
<div className='back-title-container' >
Expand Down
2 changes: 1 addition & 1 deletion src/features/workspace-members /components/MemberCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const MemberCard = ({


const func= async()=>{
console.log({[name]:new_role})

const res= await changeOrgMembersStatus(token, spaceName,{[name]:new_role})
orgMembers[name]=new_role
setOrgMembers(orgMembers)
Expand Down
3 changes: 2 additions & 1 deletion src/features/workspace-view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ const WorkspaceView = () => {
return [key, value];
})
.map(([orgName, details]) => {

return (
<WorkspaceCard
key={orgName}
workspaceName={orgName}
archeive={'true' === details.archive}
archeive={'true' === details.archeive}
bookmark={'true' === details.bookmark}
role={details.role}
archeives={archeives}
Expand Down
9 changes: 6 additions & 3 deletions src/features/workspace-view/workspace-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,14 @@ const WorkspaceCard = (props: workspaceCardProps) => {
const status: { [key: string]: boolean } = {
[workspaceName]: (!archeive),
};
console.log(status)


const res = await setOrgArcheiveStatus(token, status);
console.log(res)


const orgs = userContext?.userOrgs;
if (orgs?.userOrgs.hasOwnProperty(workspaceName)) {
orgs.userOrgs[workspaceName].archive = (!archeive).toString();
orgs.userOrgs[workspaceName].archeive= (!archeive).toString();
userContext?.setUserOrgs(orgs);
}
};
Expand All @@ -155,6 +157,7 @@ const WorkspaceCard = (props: workspaceCardProps) => {
}
};
useEffect(() => {
console.log(archeive)
workSpaceData();
}, [ userContext?.setUserOrgs ]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const ProjectCardCont: React.FC<Props> = ({
const searchValue = useSelector((state: any) => state.searchKeyword.value);

useEffect(() => {
console.log(orgProjects);
}, [weekly, searchValue]);

return (
Expand Down

0 comments on commit 4c6eaef

Please sign in to comment.