refactor: zentralisiere Konfiguration in src/config/constants.ts
- RATING_OPTIONS, INST_COLORS, AI_CONFIG, RATING_NUM_MAP aus Komponenten extrahiert - #0070AD als @theme-Farbe 'brand' in Tailwind v4 (index.css) - Alle ~70 hardcoded #0070AD-Vorkommen in Pages durch 'brand' ersetzt - BRAND_COLOR als JS-Konstante für style-Props (App.tsx)
This commit is contained in:
1 parent
ece111c0a7
commit
97e3eeb8a6
14 files changed
+139
-116
No files matched your search
+4
-2
@@ -1,4 +1,5 @@
|
||||
import { Routes, Route, NavLink } from 'react-router-dom'
|
||||
import { BRAND_COLOR } from './config/constants'
|
||||
import Dashboard from './pages/Dashboard'
|
||||
import Configuration from './pages/Configuration'
|
||||
import Consultants from './pages/Consultants'
|
||||
@@ -13,7 +14,7 @@ import Evaluation from './pages/Evaluation'
|
||||
export default function App() {
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50 flex flex-col">
|
||||
<header className="bg-[#0070AD] text-white px-4 py-3 flex items-center gap-3 shadow">
|
||||
<header className="text-white px-4 py-3 flex items-center gap-3 shadow" style={{ backgroundColor: BRAND_COLOR }}>
|
||||
<span className="font-bold text-lg tracking-tight">Assignment Monitor</span>
|
||||
</header>
|
||||
<main className="flex-1 p-4 max-w-2xl mx-auto w-full pb-20">
|
||||
@@ -42,8 +43,9 @@ export default function App() {
|
||||
to={to}
|
||||
end
|
||||
className={({ isActive }) =>
|
||||
`text-xs px-3 py-1 rounded ${isActive ? 'text-[#0070AD] font-semibold' : 'text-gray-500'}`
|
||||
`text-xs px-3 py-1 rounded ${isActive ? 'font-semibold' : 'text-gray-500'}`
|
||||
}
|
||||
style={({ isActive }) => isActive ? { color: BRAND_COLOR } : undefined}
|
||||
>
|
||||
{label}
|
||||
</NavLink>
|
||||
|
||||
Reference in new issue
Block a user