Skip to content

Commit

Permalink
fix(mainapp): use the Alert widget with the ProfilesTable component
Browse files Browse the repository at this point in the history
  • Loading branch information
a-lubert authored and xgaia committed Feb 28, 2025
1 parent bb209b8 commit 5669948
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mainapp/src/Component/ProfilesTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState, useMemo, useReducer, useEffect, ChangeEvent, forwardRef, Ref, Dispatch, MouseEventHandler } from "react";
import {
Alert,
Box,
Button,
Checkbox,
Expand Down Expand Up @@ -77,9 +78,9 @@ const ProfilesTable = () => {
</Box>
),
failure: (msg: string) => (
<Box sx={{ display: "flex", justifyContent: "center", p: 4 }}>
,<p>{`I stumbled into this error when I tried to fetch data: ${msg}. Please, reload this page.`}</p>
</Box>
<Alert variant="filled" severity="error" sx={{ m: 4 }}>
{`I stumbled into this error when I tried to fetch data: ${msg}. Please, reload this page.`}
</Alert>
),
success: (gotProfiles: Profile[]) => {
const datas = gotProfiles.map((profile) => {
Expand Down

1 comment on commit 5669948

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jest Coverage Comment

Summary

Lines Statements Branches Functions
Coverage: 76%
76.4% (476/623) 73.91% (187/253) 81.81% (99/121)
Coverage Report (76%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files76.473.9181.8176.28 
   config.js10096.551001004
   profiles.js94.5697.0594.7395.23133, 161–163
   sources.js62.9954.767562.6936, 64, 93, 143, 147, 150, 173, 219–229, 238–252, 260–270, 279–293
   tools.js41.0821.9555.5541.2685–86, 123–130, 142–174, 187–206, 231–238, 255, 265–269, 285, 297–352
   userData.js81.576410081.3335, 43, 50, 71–72, 85–86, 99–100, 111, 118–119, 127–128
   users.js95.996.879596.61239–240, 261–262
   utils.js10088.8810010016, 42

Please sign in to comment.