Frontend Phase 2 - Keywords Management: - Add MainLayout component with sidebar navigation - Implement Keywords page with MUI DataGrid - Add Keywords CRUD operations (Create, Edit, Delete dialogs) - Add search and filter functionality (Category, Status) - Install @mui/x-data-grid package for table component - Update routing to include Keywords page - Update Dashboard to use MainLayout - Add navigation menu items for all planned pages Features implemented: - Keywords list with DataGrid table - Add/Edit keyword dialog with form validation - Delete confirmation dialog - Category filter (People, Topics, Companies) - Status filter (Active, Inactive) - Search functionality - Priority management Tested in browser: - Page loads successfully - API integration working (200 OK) - Layout and navigation functional - All UI components rendering correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
42 lines
998 B
TypeScript
42 lines
998 B
TypeScript
import { Routes, Route, Navigate } from 'react-router-dom'
|
|
import { useAuthStore } from './stores/authStore'
|
|
import Login from './pages/Login'
|
|
import Dashboard from './pages/Dashboard'
|
|
import Keywords from './pages/Keywords'
|
|
|
|
function App() {
|
|
const { isAuthenticated } = useAuthStore()
|
|
|
|
return (
|
|
<Routes>
|
|
<Route path="/login" element={<Login />} />
|
|
|
|
<Route
|
|
path="/"
|
|
element={
|
|
isAuthenticated ? <Navigate to="/dashboard" replace /> : <Navigate to="/login" replace />
|
|
}
|
|
/>
|
|
|
|
<Route
|
|
path="/dashboard"
|
|
element={
|
|
isAuthenticated ? <Dashboard /> : <Navigate to="/login" replace />
|
|
}
|
|
/>
|
|
|
|
<Route
|
|
path="/keywords"
|
|
element={
|
|
isAuthenticated ? <Keywords /> : <Navigate to="/login" replace />
|
|
}
|
|
/>
|
|
|
|
{/* Catch all - redirect to dashboard or login */}
|
|
<Route path="*" element={<Navigate to="/" replace />} />
|
|
</Routes>
|
|
)
|
|
}
|
|
|
|
export default App
|