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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "3.6.5",
3
+ "version": "3.6.7",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -574,6 +574,16 @@ const AppWrapper: React.FC<Props> = (props: Props): React.ReactElement => {
574
574
  )
575
575
  );
576
576
 
577
+ // Choose error box variant
578
+ let errorBoxVariant = Variant.Danger;
579
+ if (sessionHasExpired) {
580
+ errorBoxVariant = (
581
+ isDarkModeOn()
582
+ ? Variant.Light
583
+ : Variant.Secondary
584
+ );
585
+ }
586
+
577
587
  // Build error screen
578
588
  body = (
579
589
  <div
@@ -596,12 +606,12 @@ const AppWrapper: React.FC<Props> = (props: Props): React.ReactElement => {
596
606
  : fatalErrorTitle
597
607
  )}
598
608
  error={error}
599
- variant={(
600
- isDarkModeOn()
601
- ? Variant.Light
602
- : Variant.Secondary
609
+ variant={errorBoxVariant}
610
+ icon={(
611
+ sessionHasExpired
612
+ ? faHourglassEnd
613
+ : undefined
603
614
  )}
604
- icon={faHourglassEnd}
605
615
  />
606
616
  </div>
607
617
  );