File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
site/src/pages/WorkspacePage Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,12 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
116
116
linkToTemplate ( workspace . organization_name , workspace . template_name ) ,
117
117
) ;
118
118
119
+ // Organization logic
120
+ const { organizations, showOrganizations } = useDashboard ( ) ;
121
+ const matchedOrganization = organizations . find (
122
+ ( o ) => o . id === workspace . organization_id ,
123
+ ) ;
124
+
119
125
return (
120
126
< Topbar css = { { gridArea : "topbar" } } >
121
127
< Tooltip title = "Back to workspaces" >
@@ -146,6 +152,24 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
146
152
< span > { workspace . owner_name } </ span >
147
153
</ Tooltip >
148
154
155
+ { showOrganizations && (
156
+ < >
157
+ < TopbarDivider />
158
+
159
+ { matchedOrganization && (
160
+ < UserAvatar
161
+ size = "xs"
162
+ username = { matchedOrganization . display_name }
163
+ avatarURL = { matchedOrganization . icon }
164
+ />
165
+ ) }
166
+
167
+ < Tooltip title = "Organization" >
168
+ < span > { workspace . organization_name } </ span >
169
+ </ Tooltip >
170
+ </ >
171
+ ) }
172
+
149
173
< TopbarDivider />
150
174
151
175
< Popover mode = "hover" >
You can’t perform that action at this time.
0 commit comments