Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Aug 20, 2024
1 parent e0eb015 commit 047c1ea
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
12 changes: 6 additions & 6 deletions examples/crm/src/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ const Header = () => {
const location = useLocation();
const { permissions } = usePermissions();

let currentPath = '/';
if (!!matchPath('/contacts/*', location.pathname)) {
let currentPath: string | boolean = '/';
if (!!matchPath('/', location.pathname)) {
currentPath = '/';
} else if (!!matchPath('/contacts/*', location.pathname)) {
currentPath = '/contacts';
} else if (!!matchPath('/companies/*', location.pathname)) {
currentPath = '/companies';
} else if (!!matchPath('/deals/*', location.pathname)) {
currentPath = '/deals';
} else if (!!matchPath('/settings', location.pathname)) {
currentPath = '/settings';
} else if (!!matchPath('/sales/*', location.pathname)) {
currentPath = '/sales';
} else {
currentPath = false;
}

return (
Expand Down
7 changes: 6 additions & 1 deletion examples/crm/src/root/CRM.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ const defaultLightTheme = deepmerge(defaultTheme, {
},
});

const i18nProvider = polyglotI18nProvider(() => englishMessages, 'en');
const i18nProvider = polyglotI18nProvider(
() => englishMessages,
'en',
[{ locale: 'en', name: 'English' }],
{ allowMissing: true }
);

/**
* CRM Component
Expand Down
2 changes: 1 addition & 1 deletion examples/crm/src/settings/SettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const SettingsForm = ({
},
onSuccess: () => {
notify(
'An reset password email has been sent to your email address'
'A reset password email has been sent to your email address'
);
},
onError: e => {
Expand Down

0 comments on commit 047c1ea

Please sign in to comment.