mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 03:05:42 +00:00
Tour package booking, app release, new endpoints, more updates and fixes
This commit is contained in:
@@ -103,12 +103,32 @@ export default function ConfirmDialog({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{error && (
|
||||
<div className="flex gap-3 rounded-xl bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 px-4 py-3">
|
||||
<AlertCircle className="h-4 w-4 text-red-600 dark:text-red-400 shrink-0 mt-0.5" />
|
||||
<p className="text-xs text-red-800 dark:text-red-300 leading-relaxed">{error}</p>
|
||||
</div>
|
||||
)}
|
||||
{error && (() => {
|
||||
const lines = error.split('\n').map(l => l.trim()).filter(Boolean);
|
||||
const bullets = lines.filter(l => l.startsWith('•'));
|
||||
const intro = lines.find(l => l.startsWith('Cannot') || (!l.startsWith('•') && !l.startsWith('Once') && !l.startsWith('The following')));
|
||||
const outro = lines.find(l => l.startsWith('Once'));
|
||||
return (
|
||||
<div className="rounded-xl bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 px-4 py-3 space-y-2">
|
||||
<div className="flex gap-2 items-start">
|
||||
<AlertCircle className="h-4 w-4 text-red-600 dark:text-red-400 shrink-0 mt-0.5" />
|
||||
<p className="text-xs font-medium text-red-800 dark:text-red-300 leading-relaxed">{intro ?? error}</p>
|
||||
</div>
|
||||
{bullets.length > 0 && (
|
||||
<ul className="list-disc list-inside space-y-1 pl-6">
|
||||
{bullets.map((b, i) => (
|
||||
<li key={i} className="text-xs text-red-800 dark:text-red-300 leading-relaxed">
|
||||
{b.replace(/^•\s*/, '')}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
{outro && (
|
||||
<p className="text-xs text-red-700 dark:text-red-400 pl-6">{outro}</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})()}
|
||||
</div>
|
||||
|
||||
{/* Footer */}
|
||||
|
||||
Reference in New Issue
Block a user