Skip to content

Commit 047c1ea

Browse files
committed
Fix warnings
1 parent e0eb015 commit 047c1ea

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

examples/crm/src/layout/Header.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ const Header = () => {
2626
const location = useLocation();
2727
const { permissions } = usePermissions();
2828

29-
let currentPath = '/';
30-
if (!!matchPath('/contacts/*', location.pathname)) {
29+
let currentPath: string | boolean = '/';
30+
if (!!matchPath('/', location.pathname)) {
31+
currentPath = '/';
32+
} else if (!!matchPath('/contacts/*', location.pathname)) {
3133
currentPath = '/contacts';
3234
} else if (!!matchPath('/companies/*', location.pathname)) {
3335
currentPath = '/companies';
3436
} else if (!!matchPath('/deals/*', location.pathname)) {
3537
currentPath = '/deals';
36-
} else if (!!matchPath('/settings', location.pathname)) {
37-
currentPath = '/settings';
38-
} else if (!!matchPath('/sales/*', location.pathname)) {
39-
currentPath = '/sales';
38+
} else {
39+
currentPath = false;
4040
}
4141

4242
return (

examples/crm/src/root/CRM.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ const defaultLightTheme = deepmerge(defaultTheme, {
6666
},
6767
});
6868

69-
const i18nProvider = polyglotI18nProvider(() => englishMessages, 'en');
69+
const i18nProvider = polyglotI18nProvider(
70+
() => englishMessages,
71+
'en',
72+
[{ locale: 'en', name: 'English' }],
73+
{ allowMissing: true }
74+
);
7075

7176
/**
7277
* CRM Component

examples/crm/src/settings/SettingsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const SettingsForm = ({
100100
},
101101
onSuccess: () => {
102102
notify(
103-
'An reset password email has been sent to your email address'
103+
'A reset password email has been sent to your email address'
104104
);
105105
},
106106
onError: e => {

0 commit comments

Comments
 (0)