@antscorp/antsomi-ui 3.0.0-beta.1 → 3.0.0-beta.2

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.
@@ -208,7 +208,10 @@ export const Login = props => {
208
208
  if (menus && menus.length) {
209
209
  handleLoginData(dataLogin, !isCallbackUrl && !isHomePageUrl, selectedNetworkRef.current && selectedNetworkRef.current.networkId);
210
210
  if (onLoginSuccess && typeof onLoginSuccess === 'function') {
211
- onLoginSuccess(dataLogin);
211
+ onLoginSuccess({
212
+ ...dataLogin,
213
+ networkId: selectedNetworkRef.current?.networkId ?? networkId,
214
+ });
212
215
  setLoadingSkip(false);
213
216
  }
214
217
  else if (isCallbackUrl && callbackUrl) {
@@ -242,7 +245,10 @@ export const Login = props => {
242
245
  handleLoginData(dataLogin, !isCallbackUrl && !isHomePageUrl, selectedNetworkRef.current && selectedNetworkRef.current.networkId);
243
246
  setLoadingSkip(false);
244
247
  if (onLoginSuccess && typeof onLoginSuccess === 'function') {
245
- onLoginSuccess(dataLogin);
248
+ onLoginSuccess({
249
+ ...dataLogin,
250
+ networkId: selectedNetworkRef.current?.networkId ?? networkId,
251
+ });
246
252
  }
247
253
  else if (isCallbackUrl && callbackUrl) {
248
254
  navigateTo(callbackUrl);
@@ -263,7 +269,10 @@ export const Login = props => {
263
269
  setLoadingSkip(false);
264
270
  handleLoginData(dataLogin, !isCallbackUrl && !isHomePageUrl, selectedNetworkRef.current && selectedNetworkRef.current.networkId);
265
271
  if (onLoginSuccess && typeof onLoginSuccess === 'function') {
266
- onLoginSuccess(dataLogin);
272
+ onLoginSuccess({
273
+ ...dataLogin,
274
+ networkId: selectedNetworkRef.current?.networkId ?? networkId,
275
+ });
267
276
  }
268
277
  else if (isCallbackUrl && callbackUrl) {
269
278
  navigateTo(callbackUrl);
@@ -19,6 +19,8 @@ export interface LoginData {
19
19
  G2FA: number;
20
20
  status: boolean;
21
21
  errorCode: string;
22
+ /** The networkId (portalId) of the network the user logged into */
23
+ networkId?: number | string;
22
24
  [key: string]: any;
23
25
  }
24
26
  export interface Account {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "license": "MIT",
6
6
  "author": "",