Skip to content

Commit

Permalink
docs: fix usesDynamicLoginMethods control in storybooks
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Nov 10, 2023
1 parent e222df3 commit 805b340
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stories/authPage.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down
3 changes: 2 additions & 1 deletion stories/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function withFetchResponse<T>(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();
Expand All @@ -59,6 +59,7 @@ export function resetAndInitST(recipeList?: any[]) {
SuperTokensWebJS.reset();

SuperTokens.init({
usesDynamicLoginMethods,
appInfo: {
apiDomain: "http://localhost:3000",
appName: "Storybook test",
Expand Down

0 comments on commit 805b340

Please sign in to comment.