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:
parent
97c77a1925
commit
f66aec4ac1
1 changed files with 3 additions and 0 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in a new issue