fix(17): WR-05 IN-03 IN-01 resize-aware useIsPhone hook; OidcRedirect side-effect in effect
This commit is contained in:
@@ -55,6 +55,7 @@ import { SyncStateToast } from './SyncStateToast.js';
|
||||
import { ColorLegend } from './ColorLegend.js';
|
||||
import { SkeletonCalendar } from './SkeletonCalendar.js';
|
||||
import { InstallPrompt } from './InstallPrompt.js';
|
||||
import { useIsPhone } from '../hooks/useIsPhone.js';
|
||||
|
||||
// ── Helpers ────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -71,10 +72,6 @@ function resolveDefaultView(persistedView: string): string {
|
||||
return persistedView;
|
||||
}
|
||||
|
||||
function isPhone(): boolean {
|
||||
return typeof window !== 'undefined' && window.matchMedia('(max-width: 767px)').matches;
|
||||
}
|
||||
|
||||
// ── Component ──────────────────────────────────────────────────────────────
|
||||
|
||||
export function CalendarShell() {
|
||||
@@ -249,7 +246,7 @@ export function CalendarShell() {
|
||||
const isInitialLoading = eventsQuery.isLoading && !eventsQuery.data;
|
||||
const isEventsError = eventsQuery.isError;
|
||||
|
||||
const phone = isPhone();
|
||||
const phone = useIsPhone();
|
||||
|
||||
// ── Auth splash (D-10) ────────────────────────────────────────────────────
|
||||
// Gate the calendar render on auth state so no calendar shell, skeleton, or
|
||||
|
||||
Reference in New Issue
Block a user