Spaces:
Running
Running
| tsx | |
| import React, { useEffect } from 'react' | |
| import { PromptEnhancer } from './components/PromptEnhancer' | |
| import { ErrorBoundary } from './components/ErrorBoundary' | |
| /** | |
| * Main application component for Prompt Enhancer | |
| * Handles dark mode initialization and renders the main application | |
| */ | |
| function App() { | |
| useEffect(() => { | |
| // Ensure dark mode is applied on mount | |
| document.documentElement.classList.add('dark') | |
| }, []) | |
| return ( | |
| <ErrorBoundary> | |
| <div className="min-h-screen bg-gray-50 dark:bg-gray-900 transition-colors duration-200"> | |
| <header className="border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 transition-colors duration-200"> | |
| <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6"> | |
| <div className="flex items-center justify-between"> | |
| <div className="flex items-center space-x-3"> | |
| <div className="w-10 h-10 bg-gradient-to-br from-primary-500 to-secondary-500 rounded-xl flex items-center justify-center"> | |
| <svg className="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> | |
| <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /> | |
| </svg> | |
| </div> | |
| <div> | |
| <h1 className="text-2xl font-bold text-gray-900 dark:text-gray-100"> | |
| Prompt Enhancer | |
| </h1> | |
| <p className="text-sm text-gray-600 dark:text-gray-400"> | |
| Optimiere deine KI-Prompts automatisch | |
| </p> | |
| </div> | |
| </div> | |
| <div className="flex items-center space-x-2"> | |
| <div className="px-3 py-1 bg-primary-100 dark:bg-primary-900 text-primary-800 dark:text-primary-200 rounded-full text-sm font-medium"> | |
| v1.0.0 | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"> | |
| <PromptEnhancer /> | |
| </main> | |
| <footer className="border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 transition-colors duration-200 mt-16"> | |
| <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"> | |
| <div className="flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0"> | |
| <div className="text-sm text-gray-600 dark:text-gray-400"> | |
| © 2024 Prompt Enhancer. Erstellt für optimale KI-Interaktionen. | |
| </div> | |
| <div className="flex space-x-6"> | |
| <a href="#" className="text-sm text-gray-600 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 transition-colors duration-200"> | |
| Datenschutz | |
| </a> | |
| <a href="#" className="text-sm text-gray-600 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 transition-colors duration-200"> | |
| Impressum | |
| </a> | |
| <a href="#" className="text-sm text-gray-600 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 transition-colors duration-200"> | |
| GitHub | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| </div> | |
| </ErrorBoundary> | |
| ) | |
| } | |
| export default App | |
| </html> |