Skip to content

Commit 5b8a4dc

Browse files
filter out hidden cloud connectors
1 parent 24b734c commit 5b8a4dc

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useQuery } from "react-query";
22

3+
import { getExcludedConnectorIds } from "core/domain/connector/constants";
34
import { DestinationDefinitionRead, SourceDefinitionRead } from "core/request/AirbyteClient";
45

56
import availableSourceDefinitions from "./sourceDefinitions.json";
@@ -13,18 +14,21 @@ const fetchCatalog = async (): Promise<Catalog> => {
1314
const response = await fetch(path);
1415
return response.json();
1516
};
17+
1618
export const useGetSourceDefinitions = () => {
1719
return useQuery<Catalog, Error, Catalog["sources"]>("cloud_catalog", fetchCatalog, {
1820
select: (data) => {
19-
return data.sources.map((source) => {
20-
const icon = availableSourceDefinitions.sourceDefinitions.find(
21-
(src) => src.sourceDefinitionId === source.sourceDefinitionId
22-
)?.icon;
23-
return {
24-
...source,
25-
icon,
26-
};
27-
});
21+
return data.sources
22+
.filter(() => getExcludedConnectorIds(""))
23+
.map((source) => {
24+
const icon = availableSourceDefinitions.sourceDefinitions.find(
25+
(src) => src.sourceDefinitionId === source.sourceDefinitionId
26+
)?.icon;
27+
return {
28+
...source,
29+
icon,
30+
};
31+
});
2832
},
2933
});
3034
};

airbyte-webapp/src/packages/cloud/views/DefaultView.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ export const DefaultView: React.FC = () => {
1515
const sourceDefinitionId = localStorage.getItem(EXP_SOURCE_SIGNUP_SELECTOR);
1616

1717
useEffect(() => {
18-
setTimeout(() => {
19-
localStorage.removeItem(EXP_SOURCE_SIGNUP_SELECTOR);
20-
}, 5000);
18+
localStorage.removeItem(EXP_SOURCE_SIGNUP_SELECTOR);
2119
}, []);
2220
// Only show the workspace creation list if there is more than one workspace
2321
// otherwise redirect to the single workspace

0 commit comments

Comments
 (0)