Couldn't find story matching - React + Storybook

1.7k views Asked by At

I am unable to display a story using next.js. Other stories of the app work fine. This one doesn't. Please I have been banging my head against the wall for 3 hours.

import { ComponentMeta, ComponentStory } from '@storybook/react';
import React from 'react';

import { mockAvailability } from './SpaceAvailability.test';

import SpaceAvailability from './index';

export default {
  title: 'SpaceAvailability',
  component: SpaceAvailability,
} as ComponentMeta<typeof SpaceAvailability>;

const Template: ComponentStory<typeof SpaceAvailability> = (args) => (
  <SpaceAvailability {...args} />
);

export const WeekStartsMonday = Template.bind({});
WeekStartsMonday.args = {
  availability: mockAvailability,
  weekStartsOnMonday: true,
};

export const WeekStartsSunday = Template.bind({});
WeekStartsMonday.args = {
  availability: mockAvailability,
  weekStartsOnMonday: false,
};

If I preview the story I get:

enter image description here

1

There are 1 answers

0
ioannis georgopoulos On

You have set two times the args of WeekStartsMonday.