Files
botsmann/components/shared/BotNotFoundFallback.tsx
T
g-butandClaude Opus 4.5 a192ca24a0 refactor: centralize bot page configuration and add shared components
- Add BotSection and BotNotFoundFallback shared components
- Centralize menuItems and navigation config in data/bots.ts
- Add getBotBySlug and getBotTryLink helper functions
- Add BotMenuItem, BotAccentColor, and BotNavConfig types
- Refactor all 6 bot pages to use centralized configuration
- Remove ~180 lines of duplicated code across bot pages
- Improve consistency in error handling and section spacing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 21:24:47 +01:00

46 lines
1.2 KiB
TypeScript

import { type FC } from 'react';
interface BotNotFoundFallbackProps {
botName?: string;
}
/**
* Consistent error fallback when bot configuration is not found
*/
export const BotNotFoundFallback: FC<BotNotFoundFallbackProps> = ({
botName = 'Bot',
}) => {
return (
<div className="min-h-screen flex items-center justify-center bg-white">
<div className="p-8 text-center">
<div className="text-6xl mb-4">🤖</div>
<h1 className="text-2xl font-semibold text-gray-900 mb-2">
{botName} Not Found
</h1>
<p className="text-gray-600 mb-6">
The bot configuration could not be loaded.
</p>
<a
href="/bots"
className="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
>
<svg
className="w-4 h-4 mr-2"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M15 19l-7-7 7-7"
/>
</svg>
Back to All Bots
</a>
</div>
</div>
);
};