chore: lint and format repo - 1 lint error left
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { ThemeColor } from '@shared/util/themeColors';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import CourseCellColorPicker from '@views/components/common/CourseCellColorPicker/CourseCellColorPicker';
|
||||
import React, { useState } from 'react';
|
||||
import type { ThemeColor } from 'src/shared/util/themeColors';
|
||||
|
||||
const meta = {
|
||||
title: 'Components/Common/CourseCellColorPicker',
|
||||
@@ -13,6 +13,7 @@ type Story = StoryObj<typeof CourseCellColorPicker>;
|
||||
|
||||
export const Default: Story = {
|
||||
render: () => {
|
||||
// TODO
|
||||
const [selectedColor, setSelectedColor] = useState<ThemeColor | null>(null);
|
||||
return <CourseCellColorPicker setSelectedColor={setSelectedColor} />;
|
||||
},
|
||||
|
||||
@@ -3,7 +3,6 @@ import { getThemeColorHexByName, getThemeColorRgbByName } from '@shared/util/the
|
||||
import Text from '@views/components/common/Text/Text';
|
||||
import clsx from 'clsx';
|
||||
import React from 'react';
|
||||
import { satisfies } from 'semver';
|
||||
|
||||
import type IconComponent from '~icons/material-symbols';
|
||||
|
||||
|
||||
@@ -388,4 +388,5 @@ export default function CourseCellColorPicker({
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -12,7 +12,7 @@ interface Props {
|
||||
*/
|
||||
export default function InfoCard({ titleText, bodyText }: React.PropsWithChildren<Props>): JSX.Element {
|
||||
return (
|
||||
<div className='w-50 border rounded p-4 border-gray-300 bg-white'>
|
||||
<div className='w-50 border border-gray-300 rounded bg-white p-4'>
|
||||
<div className='flex flex-col gap-1.5'>
|
||||
<Text variant='h4' as='span' className='text-ut-orange'>
|
||||
{titleText}
|
||||
|
||||
@@ -5,13 +5,13 @@ import type { CalendarCourseCellProps } from '@views/components/calendar/Calenda
|
||||
|
||||
import useSchedules from './useSchedules';
|
||||
|
||||
const dayToNumber: { [day: string]: number } = {
|
||||
const dayToNumber = {
|
||||
Monday: 0,
|
||||
Tuesday: 1,
|
||||
Wednesday: 2,
|
||||
Thursday: 3,
|
||||
Friday: 4,
|
||||
};
|
||||
} as const satisfies Record<string, number>;
|
||||
|
||||
interface CalendarGridPoint {
|
||||
dayIndex: number;
|
||||
|
||||
@@ -47,7 +47,12 @@ export default function useSchedules(): [active: UserSchedule | null, schedules:
|
||||
return [activeSchedule, schedules];
|
||||
}
|
||||
|
||||
export async function switchSchedule(name: string) {
|
||||
/**
|
||||
* Switches the active schedule to the one with the specified name.
|
||||
* @param name - The name of the schedule to switch to.
|
||||
* @returns A promise that resolves when the active schedule has been switched.
|
||||
*/
|
||||
export async function switchSchedule(name: string): Promise<void> {
|
||||
const schedules = await UserScheduleStore.get('schedules');
|
||||
const activeIndex = schedules.findIndex(s => s.name === name);
|
||||
await UserScheduleStore.set('activeIndex', activeIndex);
|
||||
|
||||
@@ -18,7 +18,7 @@ const TableDataSelector = {
|
||||
SCHEDULE_HOURS: 'td[data-th="Hour"]>span',
|
||||
SCHEDULE_LOCATION: 'td[data-th="Room"]>span',
|
||||
FLAGS: 'td[data-th="Flags"] ul li',
|
||||
} as const;
|
||||
} as const satisfies Record<string, string>;
|
||||
|
||||
type TableDataSelectorType = (typeof TableDataSelector)[keyof typeof TableDataSelector];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user