aboutsummaryrefslogtreecommitdiffstats
path: root/language-web/src/main/js/RootStore.tsx
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-11-19 20:17:56 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-11-20 03:00:38 +0100
commit40ebe0088bc97f644889d915b0524b49d4a21e4c (patch)
tree3d8a22d8f36634e3ac678f83600d9f443b47bc90 /language-web/src/main/js/RootStore.tsx
parentbuild: fix cross-project group and version config (diff)
downloadrefinery-40ebe0088bc97f644889d915b0524b49d4a21e4c.tar.gz
refinery-40ebe0088bc97f644889d915b0524b49d4a21e4c.tar.zst
refinery-40ebe0088bc97f644889d915b0524b49d4a21e4c.zip
build: upgrade to yarn 3
Also upgrades various frontend dependencies. We can't upgrade to typescript 4.5 yet, because https://github.com/yarnpkg/berry/pull/3760 is not released yet.
Diffstat (limited to 'language-web/src/main/js/RootStore.tsx')
-rw-r--r--language-web/src/main/js/RootStore.tsx18
1 files changed, 13 insertions, 5 deletions
diff --git a/language-web/src/main/js/RootStore.tsx b/language-web/src/main/js/RootStore.tsx
index 96e1b26a..baf0b61e 100644
--- a/language-web/src/main/js/RootStore.tsx
+++ b/language-web/src/main/js/RootStore.tsx
@@ -16,11 +16,19 @@ export class RootStore {
16 16
17const StoreContext = createContext<RootStore | undefined>(undefined); 17const StoreContext = createContext<RootStore | undefined>(undefined);
18 18
19export const RootStoreProvider: React.FC<{ rootStore: RootStore }> = ({ children, rootStore }) => ( 19export interface RootStoreProviderProps {
20 <StoreContext.Provider value={rootStore}> 20 children: JSX.Element;
21 {children} 21
22 </StoreContext.Provider> 22 rootStore: RootStore;
23); 23}
24
25export function RootStoreProvider({ children, rootStore }: RootStoreProviderProps): JSX.Element {
26 return (
27 <StoreContext.Provider value={rootStore}>
28 {children}
29 </StoreContext.Provider>
30 );
31}
24 32
25export const useRootStore = (): RootStore => { 33export const useRootStore = (): RootStore => {
26 const rootStore = useContext(StoreContext); 34 const rootStore = useContext(StoreContext);