Skip to content

Commit 49f06d1

Browse files
committed
[feature,i8n,localization]: added config provider to root with en as default;
1 parent fae524b commit 49f06d1

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/App.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,30 @@ import {
55
Route,
66
Navigate,
77
} from 'react-router-dom';
8+
import { ConfigProvider } from 'antd';
9+
import enUS from 'antd/locale/en_US';
810

911
import { CustomLayout } from './layout/CustomLayout';
1012
import { LazyLanding } from './component/landing/LazyLanding';
1113
import { LazyPage2 } from './component/LazyPage2';
1214
import { LazyPage3 } from './component/LazyPage3';
1315

1416
const App = () => (
15-
<BrowserRouter basename="/react-pipeline">
16-
<CustomLayout>
17-
<Routes>
18-
<Route path="/landing" element={<LazyLanding />} />
19-
<Route path="/page2" element={<LazyPage2 />} />
20-
<Route path="/page3" element={<LazyPage3 />} />
21-
<Route
22-
path="*"
23-
element={<Navigate to="/landing" replace />}
24-
/>
25-
</Routes>
26-
</CustomLayout>
27-
</BrowserRouter>
17+
<ConfigProvider locale={enUS}>
18+
<BrowserRouter basename="/react-pipeline">
19+
<CustomLayout>
20+
<Routes>
21+
<Route path="/landing" element={<LazyLanding />} />
22+
<Route path="/page2" element={<LazyPage2 />} />
23+
<Route path="/page3" element={<LazyPage3 />} />
24+
<Route
25+
path="*"
26+
element={<Navigate to="/landing" replace />}
27+
/>
28+
</Routes>
29+
</CustomLayout>
30+
</BrowserRouter>
31+
</ConfigProvider>
2832
);
2933

3034
// eslint-disable-next-line import/no-default-export

0 commit comments

Comments
 (0)