Throughout the codebase, there are multiple instances where hooks are being called using cluster.id || '' as a fallback for undefined cluster IDs This pattern can lead to unclear or unintended behavior, especially when the hook assumes a valid, non-empty string for clusterID.
👉 If we do want to allow hook calls with undefined IDs, the hook itself (e.g., useEditCluster) should be updated to:
 * Either allow undefined and handle it explicitly internally
 * Or declare a default parameter value like ''
That way, we avoid needing to update every usage across the app and improve the consistency of hook usage.
Otherwise, if passing undefined doesn't make sense — we should audit and refactor all such hook calls to avoid calling them unless a valid cluster.id exists.
Rationale:
Inline fallbacks using '' hide the problem of undefined IDs and may lead to hard-to-debug issues. This issue became more prominent during recent TypeScript refactors and was noted in #[https://github.com/RedHatInsights/uhc-portal/pull/282], but is out of scope for that PR.Â