@rango-dev/widget-embedded 0.23.1-next.26 → 0.23.1-next.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
- package/dist/containers/Settings/Lists.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/pages/LanguagePage.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/SwapDetails/SwapDetails.tsx +2 -0
- package/src/containers/Settings/Lists.tsx +20 -4
- package/src/pages/LanguagePage.tsx +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguagePage.d.ts","sourceRoot":"","sources":["../../src/pages/LanguagePage.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LanguagePage.d.ts","sourceRoot":"","sources":["../../src/pages/LanguagePage.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,wBAAgB,YAAY,sBAkD3B"}
|
package/package.json
CHANGED
|
@@ -109,6 +109,8 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
109
109
|
if (swap.status === 'success' || swap.status === 'failed') {
|
|
110
110
|
setShowCompletedModal(swap.status);
|
|
111
111
|
setAsRead(swap.requestId);
|
|
112
|
+
} else if (showCompletedModal) {
|
|
113
|
+
setShowCompletedModal(null);
|
|
112
114
|
}
|
|
113
115
|
}
|
|
114
116
|
}, [swap.status, swap.requestId]);
|
|
@@ -29,6 +29,7 @@ import { useNavigate } from 'react-router-dom';
|
|
|
29
29
|
import { SlippageTooltipContainer as TooltipContainer } from '../../components/Slippage/Slippage.styles';
|
|
30
30
|
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
31
31
|
import { ThemeModeEnum } from '../../constants/settings';
|
|
32
|
+
import { useLanguage } from '../../hooks/useLanguage';
|
|
32
33
|
import { useAppStore } from '../../store/AppStore';
|
|
33
34
|
import { getContainer } from '../../utils/common';
|
|
34
35
|
import { getUniqueSwappersGroups, isFeatureHidden } from '../../utils/settings';
|
|
@@ -85,6 +86,10 @@ export function SettingsLists() {
|
|
|
85
86
|
const navigate = useNavigate();
|
|
86
87
|
const { theme: themeConfig } = useAppStore().config;
|
|
87
88
|
const { setTheme, theme } = useAppStore();
|
|
89
|
+
const { activeLanguage, languages } = useLanguage();
|
|
90
|
+
const currentLanguage = languages.find(
|
|
91
|
+
(language) => language.local === activeLanguage
|
|
92
|
+
)?.label;
|
|
88
93
|
|
|
89
94
|
const fetchStatus = useAppStore().fetchStatus;
|
|
90
95
|
const swappers = useAppStore().swappers();
|
|
@@ -122,7 +127,7 @@ export function SettingsLists() {
|
|
|
122
127
|
(uniqueItem) => uniqueItem.selected
|
|
123
128
|
).length;
|
|
124
129
|
|
|
125
|
-
const
|
|
130
|
+
const handleSwapperEndItem = (totalSelected: number, total: number) => {
|
|
126
131
|
switch (fetchStatus) {
|
|
127
132
|
case 'loading':
|
|
128
133
|
return <Skeleton variant="text" size="medium" width={50} />;
|
|
@@ -150,7 +155,7 @@ export function SettingsLists() {
|
|
|
150
155
|
),
|
|
151
156
|
end: (
|
|
152
157
|
<>
|
|
153
|
-
{
|
|
158
|
+
{handleSwapperEndItem(totalSelectedBridgeSources, totalBridgeSources)}
|
|
154
159
|
<Divider direction="horizontal" size={8} />
|
|
155
160
|
<ChevronRightIcon color="black" />
|
|
156
161
|
</>
|
|
@@ -168,7 +173,10 @@ export function SettingsLists() {
|
|
|
168
173
|
),
|
|
169
174
|
end: (
|
|
170
175
|
<>
|
|
171
|
-
{
|
|
176
|
+
{handleSwapperEndItem(
|
|
177
|
+
totalSelectedExchangeSources,
|
|
178
|
+
totalExchangeSources
|
|
179
|
+
)}
|
|
172
180
|
<Divider direction="horizontal" size={8} />
|
|
173
181
|
<ChevronRightIcon color="gray" />
|
|
174
182
|
</>
|
|
@@ -185,7 +193,15 @@ export function SettingsLists() {
|
|
|
185
193
|
</Typography>
|
|
186
194
|
),
|
|
187
195
|
start: <LanguageIcon color="gray" size={14} />,
|
|
188
|
-
end:
|
|
196
|
+
end: (
|
|
197
|
+
<>
|
|
198
|
+
<Typography variant="body" size="medium">
|
|
199
|
+
{currentLanguage}
|
|
200
|
+
</Typography>
|
|
201
|
+
<Divider direction="horizontal" size={8} />
|
|
202
|
+
<ChevronRightIcon color="gray" />,
|
|
203
|
+
</>
|
|
204
|
+
),
|
|
189
205
|
onClick: () => navigate(navigationRoutes.languages),
|
|
190
206
|
};
|
|
191
207
|
|
|
@@ -12,9 +12,11 @@ import React from 'react';
|
|
|
12
12
|
|
|
13
13
|
import { Layout, PageContainer } from '../components/Layout';
|
|
14
14
|
import { useLanguage } from '../hooks/useLanguage';
|
|
15
|
+
import { useNavigateBack } from '../hooks/useNavigateBack';
|
|
15
16
|
|
|
16
17
|
export function LanguagePage() {
|
|
17
18
|
const { activeLanguage, changeLanguage, languages } = useLanguage();
|
|
19
|
+
const navigateBack = useNavigateBack();
|
|
18
20
|
|
|
19
21
|
const languageList = languages.map((languageItem) => {
|
|
20
22
|
const { local, label, SVGFlag } = languageItem;
|
|
@@ -26,7 +28,10 @@ export function LanguagePage() {
|
|
|
26
28
|
{label}
|
|
27
29
|
</Typography>
|
|
28
30
|
),
|
|
29
|
-
onClick: () =>
|
|
31
|
+
onClick: () => {
|
|
32
|
+
changeLanguage(languageItem.local);
|
|
33
|
+
navigateBack();
|
|
34
|
+
},
|
|
30
35
|
end: <Radio value={local} />,
|
|
31
36
|
start: <SVGFlag />,
|
|
32
37
|
};
|