@mdguggenbichler/slugbase-core 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -137,14 +137,16 @@ interface AppErrorFallbackProps {
137
137
  }
138
138
 
139
139
  function AppErrorFallback({ error, onReset }: AppErrorFallbackProps) {
140
- const { t } = useTranslation();
140
+ // Use hardcoded strings so this fallback never throws (e.g. when i18n context is missing in embedded host).
141
141
  const message = error?.message ?? (error != null ? String(error) : '');
142
142
  return (
143
143
  <div className="min-h-screen flex flex-col items-center justify-center gap-4 p-4" role="alert">
144
- <p className="text-lg text-gray-700 dark:text-gray-300 text-center">{t('common.error')}</p>
145
- {message && (
146
- <details className="w-full max-w-md text-sm text-gray-600 dark:text-gray-400" open={import.meta.env?.DEV}>
147
- <summary className="cursor-pointer">{message}</summary>
144
+ <p className="text-lg text-gray-700 dark:text-gray-300 text-center">
145
+ Something went wrong loading this page. Please try again.
146
+ </p>
147
+ {(message || error?.stack) && (
148
+ <details className="w-full max-w-md text-sm text-gray-600 dark:text-gray-400" open>
149
+ <summary className="cursor-pointer">{message || 'Error details'}</summary>
148
150
  {error?.stack && <pre className="mt-2 overflow-auto whitespace-pre-wrap">{error.stack}</pre>}
149
151
  </details>
150
152
  )}
@@ -153,7 +155,7 @@ function AppErrorFallback({ error, onReset }: AppErrorFallbackProps) {
153
155
  onClick={() => (onReset ? onReset() : window.location.reload())}
154
156
  className="px-4 py-2 rounded-md bg-primary text-primary-foreground hover:opacity-90"
155
157
  >
156
- {t('common.reload')}
158
+ Reload
157
159
  </button>
158
160
  </div>
159
161
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdguggenbichler/slugbase-core",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "SlugBase core: backend and frontend entrypoints for self-hosted and cloud apps",
5
5
  "type": "module",
6
6
  "exports": {