@@ -20,7 +20,6 @@ import { CopyButton } from "components/CopyButton/CopyButton";
20
20
import { ExternalImage } from "components/ExternalImage/ExternalImage" ;
21
21
import { usePopover } from "components/Popover/Popover" ;
22
22
import { Stack } from "components/Stack/Stack" ;
23
- import { useDashboard } from "modules/dashboard/useDashboard" ;
24
23
25
24
export const Language = {
26
25
accountLabel : "Account" ,
@@ -86,6 +85,8 @@ const styles = {
86
85
export interface UserDropdownContentProps {
87
86
user : TypesGen . User ;
88
87
organizations ?: TypesGen . Organization [ ] ;
88
+ organizationId ?: string ;
89
+ setOrganizationId ?: ( id : string ) => void ;
89
90
buildInfo ?: TypesGen . BuildInfoResponse ;
90
91
supportLinks ?: readonly TypesGen . LinkConfig [ ] ;
91
92
onSignOut : ( ) => void ;
@@ -94,12 +95,13 @@ export interface UserDropdownContentProps {
94
95
export const UserDropdownContent : FC < UserDropdownContentProps > = ( {
95
96
user,
96
97
organizations,
98
+ organizationId,
99
+ setOrganizationId,
97
100
buildInfo,
98
101
supportLinks,
99
102
onSignOut,
100
103
} ) => {
101
104
const popover = usePopover ( ) ;
102
- const { organizationId, setOrganizationId } = useDashboard ( ) ;
103
105
104
106
const onPopoverClose = ( ) => {
105
107
popover . setIsOpen ( false ) ;
@@ -150,7 +152,7 @@ export const UserDropdownContent: FC<UserDropdownContentProps> = ({
150
152
key = { org . id }
151
153
css = { styles . menuItem }
152
154
onClick = { ( ) => {
153
- setOrganizationId ( org . id ) ;
155
+ setOrganizationId ?. ( org . id ) ;
154
156
popover . setIsOpen ( false ) ;
155
157
} }
156
158
>
0 commit comments