Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
  • Loading branch information
zhyuanqi committed Apr 3, 2024
1 parent 2746d0f commit d26ef5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/plugins/data_source_management/public/components/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ export function getDefaultDataSource(
label: defaultOption?.[0]?.label || defaultOptionDataSource.attributes?.title,
},
];
}
if (defaultDataSourceAfterCheck) {
}
if (defaultDataSourceAfterCheck) {
return [
{
id: defaultDataSourceAfterCheck.id,
Expand All @@ -121,9 +121,8 @@ if (defaultDataSourceAfterCheck) {
}
if (!hideLocalCluster) {
return [LocalCluster];
}
return [];

}
return [];
}

export async function getDataSourceById(
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/dev_tools/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function DevToolsWrapper({
uiSettings,
}: DevToolsWrapperProps) {
const mountedTool = useRef<MountedDevToolDescriptor | null>(null);
const [isLoading, setIsLoading] = React.useState(false);
const [isLoading, setIsLoading] = React.useState<boolean>(true);

useEffect(
() => () => {
Expand Down Expand Up @@ -114,7 +114,7 @@ function DevToolsWrapper({
mountpoint: mountPoint,
unmountHandler,
};
setIsLoading(true);
setIsLoading(false);
};

return (
Expand All @@ -135,7 +135,7 @@ function DevToolsWrapper({
</EuiTab>
</EuiToolTip>
))}
{dataSourceEnabled && isLoading ? (
{dataSourceEnabled && !isLoading ? (
<div className="devAppDataSourceSelector">
<DataSourceSelector
savedObjectsClient={savedObjects.client}
Expand Down

0 comments on commit d26ef5f

Please sign in to comment.