CampgroundTickets/app/lib/menu.tsx
Hank 43fddec286
All checks were successful
Build Android APK / build-apk (push) Successful in 56m36s
Add event report dashboard, slide-out drawer, in-app comp portal + creator tracking
- Reporting: GET /api/stats aggregates check-in progress, ice, ticket types,
  people breakdown, add-ons/donors, gate-crew leaderboard (from audit),
  comp tickets by creator, and a by-hour check-in timeline. New /stats screen.
- Slide-out drawer (custom RN Animated, no new native deps) replaces per-screen
  header links; available on every main screen via a hamburger.
- In-app comp portal (/comp), password-gated like /crush33, reusing the portal
  endpoints; records the issuing gate-staff name (Created By column) and reports
  comps per creator.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 17:30:18 +00:00

21 lines
651 B
TypeScript

import { createContext, useContext, useState, type ReactNode } from "react";
import SideMenu from "../components/SideMenu";
interface MenuState {
open: () => void;
close: () => void;
}
const Ctx = createContext<MenuState>({ open: () => {}, close: () => {} });
export function MenuProvider({ children }: { children: ReactNode }) {
const [visible, setVisible] = useState(false);
return (
<Ctx.Provider value={{ open: () => setVisible(true), close: () => setVisible(false) }}>
{children}
<SideMenu visible={visible} onClose={() => setVisible(false)} />
</Ctx.Provider>
);
}
export const useMenu = () => useContext(Ctx);