Files
classroomio/src/lib/components/Courses/store.ts
T

27 lines
560 B
TypeScript
Raw Normal View History

2021-08-18 19:47:02 +03:00
import { writable } from 'svelte/store';
2023-09-10 07:24:06 +01:00
import type { Course } from '$lib/utils/types';
2021-08-18 19:47:02 +03:00
2023-09-10 07:24:06 +01:00
export const courses = writable<Course[]>([]);
2021-12-30 22:30:30 +02:00
export const courseMetaDeta = writable({
isLoading: true
2021-12-30 22:30:30 +02:00
});
2021-08-18 19:47:02 +03:00
export const createCourseModal = writable({
open: false,
title: '',
description: '',
emails: '',
tutors: '',
students: ''
2021-08-18 19:47:02 +03:00
});
2021-12-30 22:30:30 +02:00
export const copyCourseModalInitialState = {
open: false,
courseIdToCopy: null,
id: '',
title: '',
isSaving: false,
error: null
2021-12-30 22:30:30 +02:00
};
export const copyCourseModal = writable({ ...copyCourseModalInitialState });