Fix AI chatbot role mapping, add markdown formatting, update system prompts, and handle OpenRouter API errors

This commit is contained in:
Atharv1705
2026-07-20 12:14:58 +05:30
parent 756547a22c
commit c2e22902c8
168 changed files with 11556 additions and 2 deletions
+42
View File
@@ -0,0 +1,42 @@
import { Outlet, Link, useNavigate } from 'react-router-dom';
import { useAuth } from '../context/AuthContext';
import { useTheme } from '../context/ThemeContext';
export default function DashboardLayout() {
const { user, logout } = useAuth();
const navigate = useNavigate();
const { theme, toggleTheme } = useTheme();
return (
<div className="app-body">
<header className="app-header">
<Link to="/dashboard">
<img className="logo" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro" />
</Link>
<div className="header-actions">
<button
className="theme-toggle"
onClick={toggleTheme}
style={{background:'none', border:'none', color:'inherit', cursor:'pointer', display:'flex', alignItems:'center', justifyContent:'center', padding:'8px'}}
aria-label="Toggle Theme"
>
<span className="material-symbols-outlined theme-toggle-icon" style={{fontSize: '24px'}}>
{theme === 'dark' ? 'light_mode' : 'dark_mode'}
</span>
</button>
<button className="btn btn-secondary btn-sm" onClick={() => navigate('/profile')}>
My Profile
</button>
<button className="btn btn-primary btn-sm" onClick={logout}>
Logout
</button>
</div>
</header>
<main className="page-main page-enter">
<Outlet />
</main>
</div>
);
}