Skip to content

Commit

Permalink
Call setArgs in Preview
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed Oct 11, 2023
1 parent ce73088 commit 9a2f5d4
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { PreviewWithSelection, addons } from '@storybook/preview-api';
import { createBrowserChannel } from '@storybook/channels';
// import { setArgs } from '../args';
import { setArgs } from './args';

// @ts-ignore
global.FEATURES = { storyStoreV7: true };
Expand Down Expand Up @@ -82,10 +82,9 @@ export const Preview = () => {
console.log('render', x);
return x;
},
renderToCanvas({ id, storyFn, storyContext: { args } }: any) {
// storyFn() // calls render with the export
renderToCanvas({ id, storyContext: { args } }: any) {
setArgs(id, args);

// setArgs(id, args);
console.log('renderToCanvas', id, args);
// FIXME hardcoded path
router.push(`/storybook/${id}`);
Expand Down

0 comments on commit 9a2f5d4

Please sign in to comment.