2
0

Emoji: Cleanup new code (#36402)

This commit is contained in:
Echo
2025-10-14 11:36:25 +02:00
committed by GitHub
parent 9a001e7839
commit 0c64e7f75e
16 changed files with 356 additions and 659 deletions

View File

@@ -50,9 +50,13 @@ const preview: Preview = {
locale: 'en',
},
decorators: [
(Story, { parameters, globals }) => {
(Story, { parameters, globals, args }) => {
// Get the locale from the global toolbar
// and merge it with any parameters or args state.
const { locale } = globals as { locale: string };
const { state = {} } = parameters;
const { state: argsState = {} } = args;
const reducer = reducerWithInitialState(
{
meta: {
@@ -60,7 +64,9 @@ const preview: Preview = {
},
},
state as Record<string, unknown>,
argsState as Record<string, unknown>,
);
const store = configureStore({
reducer,
middleware(getDefaultMiddleware) {