Skip to content

Commit f764549

Browse files
committed
remove getter for style from slate
1 parent d40864d commit f764549

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

src/client/initialize.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,6 @@ export function initialize<T = {}>(): PluginInstance<T> {
229229
on('wb:plugin:style:update', callback);
230230
return () => off('wb:plugin:style:update', callback);
231231
},
232-
233-
getStyle() {
234-
return execPromise('wb:plugin:style:get');
235-
},
236232
},
237233

238234
destroy() {

src/react/hooks.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,6 @@ export function usePluginStyle(): PluginStyle | undefined {
257257
const [style, setStyle] = useState<PluginStyle | undefined>(undefined);
258258

259259
useEffect(() => {
260-
// Request initial style data on mount and subscribe to updates
261-
void client.style.getStyle().then(setStyle);
262260
return client.style.subscribeToStyle(setStyle);
263261
}, [client]);
264262

src/types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,12 +364,6 @@ export interface PluginInstance<T = any> {
364364
* @returns Unsubscriber function
365365
*/
366366
subscribeToStyle(callback: (style: PluginStyle) => void): () => void;
367-
368-
/**
369-
* Request current style from workbook
370-
* @returns Promise with current style
371-
*/
372-
getStyle(): Promise<PluginStyle>;
373367
};
374368

375369
/**

0 commit comments

Comments
 (0)