refactor: streamline connector status handling and remove warnings

- Removed the warning message handling from `useConnectorStatus` and related components to simplify status management.
- Updated `ConnectorCard` and `ConnectorAccountsListView` to eliminate warning displays, focusing on status messages instead.
- Adjusted the connector status configuration to remove warning properties, enhancing clarity and reducing complexity.
This commit is contained in:
Anish Sarkar 2026-01-09 23:30:33 +05:30
parent 207595bb33
commit b0043b6446
4 changed files with 18 additions and 51 deletions

View file

@ -110,14 +110,12 @@ export const ConnectorCard: FC<ConnectorCardProps> = ({
const {
getConnectorStatus,
isConnectorEnabled,
getConnectorWarning,
getConnectorStatusMessage,
shouldShowWarnings,
} = useConnectorStatus();
const status = getConnectorStatus(connectorType);
const isEnabled = isConnectorEnabled(connectorType);
const warning = getConnectorWarning(connectorType);
const statusMessage = getConnectorStatusMessage(connectorType);
const showWarnings = shouldShowWarnings();
@ -159,11 +157,6 @@ export const ConnectorCard: FC<ConnectorCardProps> = ({
return <span className="whitespace-nowrap text-[10px]">Never indexed</span>;
}
// Show warning message if available and warnings are enabled (only if no status message)
if (warning && showWarnings) {
return <span className="text-[10px] text-yellow-600 dark:text-yellow-500">{warning}</span>;
}
return description;
};