Skip to content

Commit cbc4818

Browse files
committed
remove react-helmet-async from storybook
1 parent fadea32 commit cbc4818

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

site/.storybook/preview.jsx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
import { DecoratorHelpers } from "@storybook/addon-themes";
2828
import isChromatic from "chromatic/isChromatic";
2929
import { StrictMode } from "react";
30-
import { HelmetProvider } from "react-helmet-async";
3130
import { QueryClient, QueryClientProvider, parseQueryArgs } from "react-query";
3231
import { withRouter } from "storybook-addon-remix-react-router";
3332
import "theme/globalFonts";
@@ -36,7 +35,7 @@ import themes from "../src/theme";
3635
DecoratorHelpers.initializeThemeState(Object.keys(themes), "dark");
3736

3837
/** @type {readonly Decorator[]} */
39-
export const decorators = [withRouter, withQuery, withHelmet, withTheme];
38+
export const decorators = [withRouter, withQuery, withTheme];
4039

4140
/** @type {Preview["parameters"]} */
4241
export const parameters = {
@@ -83,24 +82,6 @@ export const parameters = {
8382
},
8483
};
8584

86-
/**
87-
* There's a mismatch on the React Helmet return type that causes issues when
88-
* mounting the component in JS files only. Have to do type assertion, which is
89-
* especially ugly in JSDoc
90-
*/
91-
const SafeHelmetProvider = /** @type {FC} */ (
92-
/** @type {unknown} */ (HelmetProvider)
93-
);
94-
95-
/** @type {Decorator} */
96-
function withHelmet(Story) {
97-
return (
98-
<SafeHelmetProvider>
99-
<Story />
100-
</SafeHelmetProvider>
101-
);
102-
}
103-
10485
/** @type {Decorator} */
10586
function withQuery(Story, { parameters }) {
10687
const queryClient = new QueryClient({

0 commit comments

Comments
 (0)