Files
UT-Registration-Plus/src/shared/storage/UserScheduleStore.ts
Diego Perez a537d17a2f feat: inline chrome-extension-toolkit (#744)
* feat(build): inline chrome-extension-toolkit

fix: tsconfig

docs: add chrome-extension-toolkit README.md

chore: update imports

fix: stores

fix: chrome-extension-toolkit ForegroundMessenger

fix: calendarBackgroundHandler

fix: format and lint

fix: path alias

fix: add jsdom env and fix imports

Co-authored-by: Sriram Hariharan <sghsri@gmail.com>

* build: vite storybook config crx toolkit line

---------

Co-authored-by: Sriram Hariharan <sghsri@gmail.com>
Co-authored-by: Derek <derex1987@gmail.com>
2026-02-11 00:50:27 -06:00

28 lines
737 B
TypeScript

import { createLocalStore } from '@chrome-extension-toolkit';
import { UserSchedule } from '@shared/types/UserSchedule';
import { generateRandomId } from '../util/random';
interface IUserScheduleStore {
schedules: UserSchedule[];
activeIndex: number;
}
/**
* A store that is used for storing user schedules (and the active schedule)
*/
export const UserScheduleStore = createLocalStore<IUserScheduleStore>('UserScheduleStore', {
schedules: [
new UserSchedule({
courses: [],
id: generateRandomId(),
name: 'Schedule 1',
hours: 0,
updatedAt: Date.now(),
}),
],
activeIndex: 0,
});
// debugStore({ userScheduleStore: UserScheduleStore });