mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: rearrange render logic (#16631)
Change the render logic so that we always show an error message if the error is available
This commit is contained in:
@@ -47,7 +47,7 @@ export const HealthLayout: FC = () => {
|
||||
const link = useClassName(classNames.link, []);
|
||||
const activeLink = useClassName(classNames.activeLink, []);
|
||||
|
||||
if (isLoading || !healthStatus) {
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="p-6">
|
||||
<Loader />
|
||||
@@ -55,7 +55,7 @@ export const HealthLayout: FC = () => {
|
||||
);
|
||||
}
|
||||
|
||||
if (error) {
|
||||
if (error || !healthStatus) {
|
||||
return (
|
||||
<div className="p-6">
|
||||
<ErrorAlert error={error} />
|
||||
|
||||
Reference in New Issue
Block a user