fix(housekeeping): serialize workspace client props
This commit is contained in:
1 parent
8a31556d51
commit
cb77b2d3b9
7 files changed
+59
-15
No files matched your search
@@ -1,10 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import type {
|
||||
HousekeepingResult,
|
||||
HousekeepingWidgetDefinition,
|
||||
} from "../contracts";
|
||||
import type { HousekeepingResult, HousekeepingWidgetKind } from "../contracts";
|
||||
import type { HousekeepingPreferences } from "../preferences/schema";
|
||||
|
||||
export type HousekeepingPreferenceSaver = (
|
||||
@@ -44,6 +41,11 @@ export interface WidgetSettingsLabels {
|
||||
readonly error: string;
|
||||
}
|
||||
|
||||
export interface HousekeepingWidgetOption {
|
||||
readonly id: string;
|
||||
readonly kind: HousekeepingWidgetKind;
|
||||
}
|
||||
|
||||
export function WidgetSettings({
|
||||
preferences: initialPreferences,
|
||||
widgets,
|
||||
@@ -52,7 +54,7 @@ export function WidgetSettings({
|
||||
titles = {},
|
||||
}: {
|
||||
readonly preferences: HousekeepingPreferences;
|
||||
readonly widgets: readonly HousekeepingWidgetDefinition[];
|
||||
readonly widgets: readonly HousekeepingWidgetOption[];
|
||||
readonly savePreferences: HousekeepingPreferenceSaver;
|
||||
readonly labels: WidgetSettingsLabels;
|
||||
readonly titles?: Readonly<Record<string, string>>;
|
||||
|
||||
Reference in new issue
Block a user