Skip to content

Commit b3cfe24

Browse files
guilbillAijeyomah
authored andcommitted
fix: remove useless useState
1 parent 14be390 commit b3cfe24

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/ra-i18n-polyglot/src/index.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export const Basic = () => {
5151
};
5252

5353
export const AsynchronousLocaleChange = () => {
54-
const [locale, setLocale] = React.useState('en');
5554
const getAsyncMessages = locale => {
5655
if (locale === 'en') {
5756
// initial call, must return synchronously
@@ -63,7 +62,7 @@ export const AsynchronousLocaleChange = () => {
6362
}, 1000);
6463
});
6564
};
66-
const i18nProvider = polyglotI18nProvider(getAsyncMessages, locale, [
65+
const i18nProvider = polyglotI18nProvider(getAsyncMessages, 'en', [
6766
{ locale: 'en', name: 'English' },
6867
{ locale: 'fr', name: 'Français' },
6968
]);

0 commit comments

Comments
 (0)