From 805b340ce66217e5bb23474ea7579e0377fa3746 Mon Sep 17 00:00:00 2001 From: Mihaly Lengyel Date: Fri, 10 Nov 2023 10:40:54 +0100 Subject: [PATCH] docs: fix usesDynamicLoginMethods control in storybooks --- stories/authPage.stories.tsx | 2 +- stories/utils.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stories/authPage.stories.tsx b/stories/authPage.stories.tsx index f3b9f52d4..2bb837098 100644 --- a/stories/authPage.stories.tsx +++ b/stories/authPage.stories.tsx @@ -37,7 +37,7 @@ const meta: Meta<{ render: (args, { loaded: { featureState } }) => { const { prebuiltUIs, key } = useMemo(() => { const { prebuiltUIs, recipeList } = buildInit(unflattenArgs(args)); - resetAndInitST(recipeList); + resetAndInitST(recipeList, args.usesDynamicLoginMethods); return { prebuiltUIs, key: JSON.stringify(args) }; }, [args]); diff --git a/stories/utils.ts b/stories/utils.ts index 0f7f3d4d1..fe09f01e3 100644 --- a/stories/utils.ts +++ b/stories/utils.ts @@ -37,7 +37,7 @@ export function withFetchResponse(resp: T): T & { fetchResponse: Response } { return resp as any; } -export function resetAndInitST(recipeList?: any[]) { +export function resetAndInitST(recipeList?: any[], usesDynamicLoginMethods?: boolean) { SessionRecipe.reset(); PasswordlessRecipe.reset(); EmailPasswordRecipe.reset(); @@ -59,6 +59,7 @@ export function resetAndInitST(recipeList?: any[]) { SuperTokensWebJS.reset(); SuperTokens.init({ + usesDynamicLoginMethods, appInfo: { apiDomain: "http://localhost:3000", appName: "Storybook test",