Improve lazy loading (#12186)
WIP, using preview app to test performance (which was very bad)
This commit is contained in:
@ -98,11 +98,18 @@ export type CatalogOptions = {
|
||||
|
||||
export const CatalogDecorator: Decorator = (Story, context) => {
|
||||
const {
|
||||
catalog: { dimensions, options },
|
||||
} = context.parameters;
|
||||
catalog: { dimensions = [], options = {} } = {
|
||||
dimensions: [],
|
||||
options: {},
|
||||
},
|
||||
} = context.parameters || {};
|
||||
|
||||
if (!dimensions || !Array.isArray(dimensions)) {
|
||||
return <Story />;
|
||||
}
|
||||
|
||||
const [
|
||||
dimension1,
|
||||
dimension1 = emptyDimension,
|
||||
dimension2 = emptyDimension,
|
||||
dimension3 = emptyDimension,
|
||||
dimension4 = emptyDimension,
|
||||
|
||||
Reference in New Issue
Block a user