Type more frontend pages and fix their hook dependencies
Cashup, users, profile, consent, allocations, event options, forms, event tickets, ticket scanning and manual registration now use real types. Data loaders are wrapped in useCallback and listed as effect dependencies. Also adds shared Attendee, Section and form response types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,9 @@ export function currentImpersonation(): Impersonation | null {
|
||||
export const isImpersonating = () => !!currentImpersonation();
|
||||
|
||||
/** Switches this browser to the impersonation token and opens the user's dashboard. */
|
||||
export function beginImpersonation(res: { token: string; session: { id: string; expiresAt: string; target: { name: string; email: string } } }) {
|
||||
export type ImpersonationStart = { token: string; session: { id: string; expiresAt: string; target: { name: string; email: string } } };
|
||||
|
||||
export function beginImpersonation(res: ImpersonationStart) {
|
||||
try {
|
||||
localStorage.setItem(ADMIN_TOKEN_KEY, localStorage.getItem(TOKEN_KEY) || "");
|
||||
localStorage.setItem(ADMIN_CACHE_KEY, localStorage.getItem(USER_CACHE_KEY) || "");
|
||||
|
||||
Reference in New Issue
Block a user