{Trend,}TimelinePanel: use TootList
All checks were successful
/ depoly (push) Successful in 1m16s

This commit is contained in:
thislight 2024-10-29 15:22:25 +08:00
parent f1197d6ba0
commit 73a56357d9
No known key found for this signature in database
GPG key ID: A50F9451AC56A63E
8 changed files with 153 additions and 267 deletions

View file

@ -18,12 +18,15 @@ const HeroSourceContext = createContext<Signal<HeroSource>>(
export const HeroSourceProvider = HeroSourceContext.Provider;
function useHeroSource() {
export function useHeroSource() {
return useContext(HeroSourceContext);
}
/**
* Use hero value for the {@link key}.
*
* Note: the setter here won't set the value of the hero source.
* To set hero source, use {@link useHeroSource} and set the corresponding key.
*/
export function useHeroSignal(
key: string | symbol | number,
@ -46,6 +49,7 @@ export function useHeroSignal(
return [get, set];
} else {
console.debug("no hero source")
return [() => undefined, () => undefined];
}
}