dce-reactkit 3.6.5 → 3.6.7

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/cjs/index.js CHANGED
@@ -1148,6 +1148,13 @@ const AppWrapper = (props) => {
1148
1148
  const error = (sessionHasExpired
1149
1149
  ? new ErrorWithCode(getSessionExpiredMessage(), ReactKitErrorCode$1.SessionExpired)
1150
1150
  : new ErrorWithCode((fatalErrorMessage !== null && fatalErrorMessage !== void 0 ? fatalErrorMessage : 'An unknown error has occurred. Please contact support.'), (fatalErrorCode !== null && fatalErrorCode !== void 0 ? fatalErrorCode : ReactKitErrorCode$1.NoCode)));
1151
+ // Choose error box variant
1152
+ let errorBoxVariant = Variant$1.Danger;
1153
+ if (sessionHasExpired) {
1154
+ errorBoxVariant = (isDarkModeOn()
1155
+ ? Variant$1.Light
1156
+ : Variant$1.Secondary);
1157
+ }
1151
1158
  // Build error screen
1152
1159
  body = (React__default["default"].createElement("div", { style: {
1153
1160
  display: 'block',
@@ -1160,9 +1167,9 @@ const AppWrapper = (props) => {
1160
1167
  } },
1161
1168
  React__default["default"].createElement(ErrorBox, { title: (sessionHasExpired
1162
1169
  ? 'Session Expired'
1163
- : fatalErrorTitle), error: error, variant: (isDarkModeOn()
1164
- ? Variant$1.Light
1165
- : Variant$1.Secondary), icon: freeSolidSvgIcons.faHourglassEnd })));
1170
+ : fatalErrorTitle), error: error, variant: errorBoxVariant, icon: (sessionHasExpired
1171
+ ? freeSolidSvgIcons.faHourglassEnd
1172
+ : undefined) })));
1166
1173
  }
1167
1174
  /* --------------- App -------------- */
1168
1175
  if (!body) {