fix(10-04): prettier format + remove unnecessary type assertions
- Run prettier on all new/modified PWA files (CredentialSheet, SetupBanner, AdminPage, admin.spec.ts) - Remove unnecessary 'as React.RefObject<HTMLElement | null>' casts flagged by @typescript-eslint/no-unnecessary-type-assertion - Format pre-existing API files from Plans 02/03 (me.ts, user.test.ts, requireAdmin.test.ts, me.test.ts) - All 270 API tests + 191 PWA vitest tests pass; lint/typecheck/build clean
This commit is contained in:
@@ -30,6 +30,7 @@ import { CredentialSheet } from './CredentialSheet.js';
|
||||
|
||||
export function SetupBanner() {
|
||||
const [sheetOpen, setSheetOpen] = useState(false);
|
||||
// Use HTMLButtonElement for the ref (assignable to the CredentialSheet's HTMLElement trigger)
|
||||
const ctaRef = useRef<HTMLButtonElement>(null);
|
||||
|
||||
const meQuery = useQuery({
|
||||
@@ -124,7 +125,7 @@ export function SetupBanner() {
|
||||
onClose={() => setSheetOpen(false)}
|
||||
mode="self-service"
|
||||
memberName={memberName}
|
||||
triggerRef={ctaRef as React.RefObject<HTMLElement | null>}
|
||||
triggerRef={ctaRef}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user