docs(storybook): clarify global decorator guarantees nav/auth context (Phase 3)

All stories run under AuthProvider and MemoryRouter; no story should
crash on missing useContext for auth or router.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
senke 2026-02-05 13:08:45 +01:00
parent 97c77a1925
commit f66aec4ac1

View file

@ -2,6 +2,9 @@
* Global Storybook decorator: single point of entry for all app providers.
* No story should import or wrap with these providers directly; they are applied here.
* Stories that need a specific route can set parameters.router.initialEntries.
*
* This ensures useAuth, useNavigate, useSearchParams, useQueryClient, useToast
* and similar hooks never run without context (no "must be used within XProvider" crashes).
*/
import React from 'react';
import type { Decorator } from '@storybook/react';