Skip to content

Commit 0cb08d7

Browse files
committed
Import from non-compat modules in fluent-react examples
1 parent 48c4fc1 commit 0cb08d7

File tree

22 files changed

+39
-42
lines changed

22 files changed

+39
-42
lines changed

fluent-react/examples/async-messages/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Localized } from 'fluent-react/compat';
2+
import { Localized } from 'fluent-react';
33

44
export default function App() {
55
return (

fluent-react/examples/async-messages/src/l10n.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React, { Component } from 'react';
22
import delay from 'delay';
33

4-
import 'fluent-intl-polyfill/compat';
5-
import { MessageContext } from 'fluent/compat';
6-
import { LocalizationProvider } from 'fluent-react/compat';
7-
import { negotiateLanguages } from 'fluent-langneg/compat';
4+
import 'fluent-intl-polyfill';
5+
import { MessageContext } from 'fluent';
6+
import { LocalizationProvider } from 'fluent-react';
7+
import { negotiateLanguages } from 'fluent-langneg';
88

99
async function fetchMessages(locale) {
1010
const { PUBLIC_URL } = process.env;

fluent-react/examples/change-language/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Localized } from 'fluent-react/compat';
2+
import { Localized } from 'fluent-react';
33

44
export default function App(props) {
55
const { currentLocales, handleLocaleChange } = props;

fluent-react/examples/change-language/src/l10n.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { cloneElement, Children, Component } from 'react';
22

3-
import 'fluent-intl-polyfill/compat';
4-
import { MessageContext } from 'fluent/compat';
5-
import { LocalizationProvider } from 'fluent-react/compat';
6-
import { negotiateLanguages } from 'fluent-langneg/compat';
3+
import 'fluent-intl-polyfill';
4+
import { MessageContext } from 'fluent';
5+
import { LocalizationProvider } from 'fluent-react';
6+
import { negotiateLanguages } from 'fluent-langneg';
77

88
const MESSAGES_ALL = {
99
'pl': `

fluent-react/examples/fallback-sync/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Localized } from 'fluent-react/compat';
2+
import { Localized } from 'fluent-react';
33

44
export default function App() {
55
return (

fluent-react/examples/fallback-sync/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { LocalizationProvider } from 'fluent-react/compat';
3+
import { LocalizationProvider } from 'fluent-react';
44

55
import { generateMessages } from './l10n';
66
import App from './App';

fluent-react/examples/fallback-sync/src/l10n.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import 'fluent-intl-polyfill/compat';
2-
import { MessageContext } from 'fluent/compat';
1+
import 'fluent-intl-polyfill';
2+
import { MessageContext } from 'fluent';
33

44
const MESSAGES_ALL = {
55
'pl': `
@@ -18,4 +18,3 @@ export function* generateMessages() {
1818
yield cx;
1919
}
2020
}
21-

fluent-react/examples/hello-world/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Localized } from 'fluent-react/compat';
2+
import { Localized } from 'fluent-react';
33

44
export default function App() {
55
return (

fluent-react/examples/hello-world/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { LocalizationProvider } from 'fluent-react/compat';
3+
import { LocalizationProvider } from 'fluent-react';
44

55
import { generateMessages } from './l10n';
66
import App from './App';

fluent-react/examples/hello-world/src/l10n.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import 'fluent-intl-polyfill/compat';
2-
import { MessageContext } from 'fluent/compat';
3-
import { negotiateLanguages } from 'fluent-langneg/compat';
1+
import 'fluent-intl-polyfill';
2+
import { MessageContext } from 'fluent';
3+
import { negotiateLanguages } from 'fluent-langneg';
44

55
const MESSAGES_ALL = {
66
'pl': `
@@ -25,4 +25,3 @@ export function* generateMessages(userLocales) {
2525
yield cx;
2626
}
2727
}
28-

0 commit comments

Comments
 (0)