Skip to content

Commit 7709d58

Browse files
committed
replace orgs data with myorg for dropdown
1 parent a902532 commit 7709d58

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

client/packages/lowcoder/src/pages/common/profileDropdown.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,11 @@ export default function ProfileDropdown(props: DropDownProps) {
259259
}, [dropdownVisible, workspaces.items.length, dispatch]);
260260

261261
const filteredOrgs = useMemo(() => {
262-
if (!searchTerm.trim()) return orgs;
263-
return orgs.filter(org =>
262+
if (!searchTerm.trim()) return workspaces.items;
263+
return workspaces.items.filter(org =>
264264
org.name.toLowerCase().includes(searchTerm.toLowerCase())
265265
);
266-
}, [orgs, searchTerm]);
266+
}, [workspaces.items, searchTerm]);
267267

268268
const handleProfileClick = () => {
269269
if (checkIsMobile(window.innerWidth)) {
@@ -320,11 +320,11 @@ export default function ProfileDropdown(props: DropDownProps) {
320320
</ProfileSection>
321321

322322
{/* Workspaces Section */}
323-
{orgs && orgs.length > 0 && showSwitchOrg(props.user, sysConfig) && (
323+
{workspaces.items && workspaces.items.length > 0 && showSwitchOrg(props.user, sysConfig) && (
324324
<WorkspaceSection>
325325
<SectionHeader>{trans("profile.switchOrg")}</SectionHeader>
326326

327-
{orgs.length > 3 && (
327+
{workspaces.items.length > 3 && (
328328
<SearchContainer>
329329
<StyledSearchInput
330330
placeholder="Search workspaces..."

0 commit comments

Comments
 (0)