diff --git a/packages/webapp/src/components/App.tsx b/packages/webapp/src/components/App.tsx
index 8e3ace04f..d54dcf905 100644
--- a/packages/webapp/src/components/App.tsx
+++ b/packages/webapp/src/components/App.tsx
@@ -1,5 +1,4 @@
// @ts-nocheck
-import { defaultTheme, ThemeProvider } from '@xstyled/emotion';
import { lazy, Suspense } from 'react';
import { Router, Switch, Route } from 'react-router';
import { createBrowserHistory } from 'history';
@@ -37,12 +36,6 @@ const PaymentPortalPage = lazy(
() => import('@/containers/PaymentPortal/PaymentPortalPage'),
);
-
-const theme = {
- ...defaultTheme,
- bpPrefix: 'bp4',
-}
-
/**
* App inner.
*/
@@ -50,38 +43,33 @@ function AppInsider({ history }) {
return (
-
-
-
-
- }
- />
-
-
-
-
-
-
-
+
+
+
+ } />
+
+
+
+
+
+
+
- }
- />
- } />
- }
- />
- } />
-
-
-
+ }
+ />
+ } />
+ }
+ />
+ } />
+
+
+
-
-
+
);
diff --git a/packages/webapp/src/components/AppIntlProvider.tsx b/packages/webapp/src/components/AppIntlProvider.tsx
index 24dd05be0..595a4a839 100644
--- a/packages/webapp/src/components/AppIntlProvider.tsx
+++ b/packages/webapp/src/components/AppIntlProvider.tsx
@@ -1,12 +1,31 @@
// @ts-nocheck
import React, { createContext } from 'react';
-const AppIntlContext = createContext();
+interface AppIntlContextValue {
+ currentLocale: string;
+ direction: 'rtl' | 'ltr';
+ isRTL: boolean;
+ isLTR: boolean;
+}
+
+const AppIntlContext = createContext(
+ {} as AppIntlContextValue,
+);
+
+interface AppIntlProviderProps {
+ currentLocale: string;
+ isRTL: boolean;
+ children: React.ReactNode;
+}
/**
* Application intl provider.
*/
-function AppIntlProvider({ currentLocale, isRTL, children }) {
+function AppIntlProvider({
+ currentLocale,
+ isRTL,
+ children,
+}: AppIntlProviderProps) {
const provider = {
currentLocale,
isRTL,
@@ -21,6 +40,7 @@ function AppIntlProvider({ currentLocale, isRTL, children }) {
);
}
-const useAppIntlContext = () => React.useContext(AppIntlContext);
+const useAppIntlContext = () =>
+ React.useContext(AppIntlContext);
export { AppIntlProvider, useAppIntlContext };
diff --git a/packages/webapp/src/components/Dashboard/DashboardThemeProvider.tsx b/packages/webapp/src/components/Dashboard/DashboardThemeProvider.tsx
index 763e5e773..fc7f657a9 100644
--- a/packages/webapp/src/components/Dashboard/DashboardThemeProvider.tsx
+++ b/packages/webapp/src/components/Dashboard/DashboardThemeProvider.tsx
@@ -1,9 +1,20 @@
-// @ts-nocheck
import React from 'react';
-import { ThemeProvider, StyleSheetManager } from 'styled-components';
+import {
+ ThemeProvider as StyleComponentsThemeProvider,
+ StyleSheetManager,
+} from 'styled-components';
import rtlcss from 'stylis-rtlcss';
+import {
+ defaultTheme,
+ ThemeProvider as XStyledEmotionThemeProvider,
+} from '@xstyled/emotion';
import { useAppIntlContext } from '../AppIntlProvider';
+const theme = {
+ ...defaultTheme,
+ bpPrefix: 'bp4',
+};
+
interface DashboardThemeProviderProps {
children: React.ReactNode;
}
@@ -17,7 +28,11 @@ export function DashboardThemeProvider({
- {children}
+
+
+ {children}
+
+
);
}