feat: 添加通用错误页面组件及样式,用于处理路由和应用错误。

This commit is contained in:
2026-01-30 10:09:51 +08:00
parent bbceadbdce
commit ee4684f002
2 changed files with 54 additions and 53 deletions

View File

@@ -44,6 +44,7 @@
margin-bottom: 12px;
background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}

View File

@@ -57,7 +57,7 @@ const ErrorPage: React.FC = () => {
</button>
</div>
{process.env.NODE_ENV === 'development' && error instanceof Error && (
{import.meta.env.DEV && error instanceof Error && (
<div className="error-stack">
<pre>{error.stack}</pre>
</div>