Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: maria-rcks <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
10 lines
308 B
TypeScript
10 lines
308 B
TypeScript
import { useSyncExternalStore } from "react";
|
|
|
|
import { getCustomThemes, subscribeToCustomThemes } from "../themePalette";
|
|
|
|
const EMPTY_CUSTOM_THEMES: readonly [] = [];
|
|
|
|
export function useCustomThemes() {
|
|
return useSyncExternalStore(subscribeToCustomThemes, getCustomThemes, () => EMPTY_CUSTOM_THEMES);
|
|
}
|