build: update storybook (#214)
* chore: Update updatedAt dates in schedules Set updatedAt dates to be fixed to '2024-01-01 12:00' for all schedules in UserScheduleStore. * build: update storybook * chore: Removed unnecessary eslint-disable-next-line statements.
This commit is contained in:
@@ -38,23 +38,11 @@ const meta: Meta<typeof ScheduleDropdown> = {
|
||||
layout: 'centered',
|
||||
},
|
||||
tags: ['autodocs'],
|
||||
argTypes: {
|
||||
defaultOpen: {
|
||||
control: {
|
||||
type: 'boolean',
|
||||
},
|
||||
},
|
||||
children: {
|
||||
control: {
|
||||
type: 'node',
|
||||
},
|
||||
},
|
||||
},
|
||||
render: (args: ScheduleDropdownProps) => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
|
||||
const [activeSchedule, schedules] = useSchedules();
|
||||
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
|
||||
useEffect(() => {
|
||||
console.log(activeSchedule);
|
||||
}, [activeSchedule]);
|
||||
|
||||
@@ -12,13 +12,6 @@ const meta = {
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
argTypes: {
|
||||
schedule: {
|
||||
control: {
|
||||
type: 'UserSchedule',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
schedule: exampleSchedule,
|
||||
},
|
||||
@@ -30,7 +23,7 @@ type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Active: Story = {
|
||||
render(args) {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
|
||||
const [activeSchedule] = useSchedules();
|
||||
|
||||
return (
|
||||
|
||||
@@ -117,6 +117,7 @@ export const Default: Story = {
|
||||
export const Empty: Story = {
|
||||
args: {
|
||||
courseCells: [],
|
||||
setCourse: () => {},
|
||||
},
|
||||
render: props => (
|
||||
<div className='outline-red outline w-292.5!'>
|
||||
|
||||
@@ -135,5 +135,6 @@ export const Default: Story = {
|
||||
args: {
|
||||
saturdayClass: true,
|
||||
courseCells: testData,
|
||||
setCourse: () => {},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ const meta = {
|
||||
},
|
||||
tags: ['autodocs'],
|
||||
render(args) {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
|
||||
const [isOpen, setIsOpen] = useState(args.open);
|
||||
|
||||
return <CourseCatalogInjectedPopup {...args} open={isOpen} onClose={() => setIsOpen(false)} />;
|
||||
|
||||
Reference in New Issue
Block a user