69a5f0ceb1326f049494b59e7812413dd69da956
Replace multi-hop prop forwarding with a dedicated JailContext that manages jail state and actions. This reduces coupling, simplifies the component hierarchy, and makes the data flow more explicit. Changes: - Create JailContext.tsx with JailProvider and useJailContext hook - Wrap JailsPage content with JailProvider to expose jail state - Refactor JailOverviewSection to use useJailContext instead of props - Remove 10 props from JailOverviewSection component signature - Add comprehensive documentation on state ownership and prop drilling Benefits: - Eliminates unnecessary prop chains through intermediate components - Makes component contracts clearer (no longer need to pass unrelated props) - Simplifies future refactoring of jail-related functionality - Sets a pattern for other page-scoped state management Testing: - TypeScript type check passes (tsc --noEmit) - Frontend builds successfully - Existing JailsPage tests pass with new context structure Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
No description provided
Languages
Python
61.2%
TypeScript
24.9%
HTML
8.4%
Markdown
2.5%
Roff
0.9%
Other
2%