This commit is contained in:
legop3
2025-11-17 04:35:16 -05:00
parent 37dbb1c5d9
commit d26587140d
6 changed files with 24 additions and 10 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import LogPanel from './components/LogPanel.jsx';
import AuthPanel from './components/AuthPanel.jsx';
import DriverVideoPanel from './components/DriverVideoPanel.jsx';
import RightPaneTabs from './components/RightPaneTabs.jsx';
import SessionSnapshot from './components/SessionSnapshot.jsx';
function useLayoutMode() {
const [mode, setMode] = useState(() => {
@@ -50,7 +51,7 @@ function DesktopLayout({ layout }) {
</section>
<section className="grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1">
<AdminPanel />
<LogPanel />
<SessionSnapshot />
</section>
</div>
);
+13
View File
@@ -0,0 +1,13 @@
import { useMemo } from 'react';
import { useSession } from '../context/SessionContext.jsx';
export default function SessionSnapshot() {
const { session } = useSession();
const payload = useMemo(() => JSON.stringify(session ?? {}, null, 2), [session]);
return (
<div className="rounded-sm bg-[#242a32] p-1 text-xs text-slate-100">
<p className="text-sm text-slate-400">Session snapshot</p>
<pre className="mt-1 max-h-64 overflow-y-auto bg-black/40 p-1 text-[0.7rem] text-lime-300">{payload}</pre>
</div>
);
}