File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
apps/frontend/src/features/workspace Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,13 @@ import {
77} from "../api/workspaceStatusApi" ;
88
99export const useWorkspaceStatus = ( ) => {
10- const { data : workspaces } = useUserWorkspace ( ) ;
10+ const { data } = useUserWorkspace ( ) ;
1111 const currentWorkspaceId = useWorkspace ( ) ;
1212
13- return workspaces ?. find ( ( workspace ) => workspace . id === currentWorkspaceId )
14- ?. visibility ;
13+ const workspaces = data ?. workspaces ;
14+ return workspaces ?. find (
15+ ( workspace ) => workspace . workspaceId === currentWorkspaceId ,
16+ ) ?. visibility ;
1517} ;
1618
1719export const useToggleWorkspaceStatus = (
Original file line number Diff line number Diff line change @@ -5,17 +5,18 @@ import { useUserWorkspace } from "../../model/useWorkspace";
55
66export function Sharebutton ( ) {
77 const currentWorkspaceId = useWorkspace ( ) ;
8- const workspaces = useUserWorkspace ( ) ;
8+ const { data } = useUserWorkspace ( ) ;
9+ const workspaces = data ?. workspaces ;
910 const workspace = workspaces ?. find (
10- ( workspace ) => workspace . id === currentWorkspaceId ,
11+ ( workspace ) => workspace . workspaceId === currentWorkspaceId ,
1112 ) ;
1213 const isGuest = workspace ?. role === "guest" ;
1314
1415 return (
1516 < div className = "flex h-9 items-center justify-center" >
1617 < button
1718 disabled = { isGuest }
18- className = "rounded-md bg-blue-400 px-2 py-1 text-[#171717] hover:bg-blue-500"
19+ className = "rounded-md bg-blue-400 px-2 py-1 text-sm text-white hover:bg-blue-500"
1920 >
2021 공유
2122 </ button >
You can’t perform that action at this time.
0 commit comments