Hide connect btn and only show when phoenix notebooks or features are used (#1318)

This commit is contained in:
Karthik chakravarthy 2022-08-22 19:07:01 -04:00 committed by GitHub
parent 06c3b6fe94
commit a4061a96b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -56,10 +56,8 @@ export const CommandBar: React.FC<Props> = ({ container }: Props) => {
const connectionInfo = useNotebook((state) => state.connectionInfo);
if (
useNotebook.getState().isPhoenixNotebooks ||
(useNotebook.getState().isPhoenixFeatures &&
connectionInfo?.status !== ConnectionStatusType.Connect &&
connectionInfo?.status !== ConnectionStatusType.Reconnect)
(useNotebook.getState().isPhoenixNotebooks || useNotebook.getState().isPhoenixFeatures) &&
connectionInfo?.status !== ConnectionStatusType.Connect
) {
uiFabricControlButtons.unshift(CommandBarUtil.createConnectionStatus(container, "connectionStatus"));
}