Skip to content

Commit 9883336

Browse files
committed
Improve the Environment Not Found UI
1 parent 8e0f94b commit 9883336

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

client/packages/lowcoder/src/pages/setting/environments/EnvironmentDetail.tsx

+31-6
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,37 @@ const EnvironmentDetail: React.FC = () => {
9393

9494
if (error || !environment) {
9595
return (
96-
<Alert
97-
message="Error loading environment"
98-
description={error || "Environment not found"}
99-
type="error"
100-
showIcon
101-
/>
96+
<div style={{ padding: "24px", flex: 1 }}>
97+
<Breadcrumb style={{ marginBottom: "16px" }}>
98+
<Breadcrumb.Item>
99+
<span
100+
style={{ cursor: "pointer" }}
101+
onClick={() => history.push("/setting/environments")}
102+
>
103+
<HomeOutlined /> Environments
104+
</span>
105+
</Breadcrumb.Item>
106+
<Breadcrumb.Item>Not Found</Breadcrumb.Item>
107+
</Breadcrumb>
108+
109+
<Card>
110+
<div style={{ textAlign: "center", padding: "40px 0" }}>
111+
<Title level={3} style={{ color: "#ff4d4f" }}>
112+
Environment Not Found
113+
</Title>
114+
<Text type="secondary" style={{ display: "block", margin: "16px 0" }}>
115+
{error || "The environment you're looking for doesn't exist or you don't have permission to view it."}
116+
</Text>
117+
<Button
118+
type="primary"
119+
onClick={() => history.push("/setting/environments")}
120+
style={{ marginTop: "16px" }}
121+
>
122+
Return to Environments List
123+
</Button>
124+
</div>
125+
</Card>
126+
</div>
102127
);
103128
}
104129

0 commit comments

Comments
 (0)