Files
classroomio/apps/dashboard/src/lib/features/settings/utils/store.ts
T

17 lines
835 B
TypeScript
Raw Normal View History

import type { Writable } from 'svelte/store';
import { writable } from 'svelte/store';
import type { OrgLandingPageJson } from '$lib/utils/types/org';
import type { LandingSectionKey } from '@cio/ui/custom/org-landing-page';
import { createDefaultLandingPageSettings } from '$features/org/utils/landing-page';
export const landingPageSettings: Writable<OrgLandingPageJson> = writable(createDefaultLandingPageSettings());
/**
* Section currently selected in the landing-page editor preview. Shared between
* the left rail (which switches its panel based on this) and the preview wrappers
* (which render the outline + cap when their sectionKey matches). `null` means
* no section is selected — the editor shows the section list.
*/
export const landingPageEditorSelection: Writable<LandingSectionKey | null> = writable(null);