Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Expose subscribeToNewsletter as a context #1142

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

defunctzombie
Copy link
Contributor

@defunctzombie defunctzombie commented Jun 2, 2021

Allows for replacing within stories and tests via context rather than out of band mocks.
Remove the storybook mock and webpack alias that powered the mock.


Something with the mock was not working in #1017 so we opt for this approach to unblock 1017.

Allows for replacing within stories and tests via context rather than out of band mocks.
Remove the storybook mock and webpack alias that powered the mock.
@defunctzombie defunctzombie merged commit 6f468cc into main Jun 2, 2021
@defunctzombie defunctzombie deleted the roman/welcome-panel-subscribe-context branch June 2, 2021 17:28

import subscribeToNewsletter from "./subscribeToNewsletter";

type SubscribeNewsletterFn = (email: string) => Promise<void> | void;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's with Promise<void> | void?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

storybook action("Foo") returns a function that returns void.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants