Skip to content

Commit 6082b44

Browse files
committed
259 Remove todo's and fix lint
1 parent 8cc079e commit 6082b44

11 files changed

Lines changed: 6 additions & 25 deletions

File tree

client/eslint.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ export default defineConfig([
1818
reactHooks.configs.flat.recommended,
1919
{
2020
rules: {
21-
// ToDo check rules that are off and warn
2221
"react/prop-types": "off",
2322
"react/no-children-prop": "off",
2423
'react-hooks/exhaustive-deps': 'warn',
2524
"react/react-in-jsx-scope" : "off",
26-
"react-hooks/set-state-in-effect": "off",
25+
"react-hooks/set-state-in-effect": "warn",
2726
"react-hooks/immutability":"off"
2827
},
2928
},

client/src/__tests__/utils/Utils.test.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,5 @@ describe('Utils', () => {
1212
}],
1313
"id");
1414
expect(res.length).toEqual(3);
15-
16-
const resId = distinctValues([{id: 1, val: "val1"}, {id: 1, val: "valX"}, {id: 2, val: "val2"}, {
17-
id: 3,
18-
val: "val3"
19-
}],
20-
"id");
21-
expect(res.length).toEqual(3);
2215
});
2316
});

client/src/components/Header.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {useAppStore} from "../stores/AppStore";
77
import I18n from "../locale/I18n";
88

99
export const Header = () => {
10-
const {user, config} = useAppStore(state => state);
10+
const {user} = useAppStore(state => state);
1111

1212
const actions = []
1313

@@ -21,7 +21,6 @@ export const Header = () => {
2121
</Link>
2222
{(user && user.id) &&
2323
<UserMenu user={user}
24-
config={config}
2524
actions={actions}
2625
/>
2726
}

client/src/components/UserMenu.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {logout} from "../api";
99
import {AUTHORITIES, highestAuthority} from "../utils/UserRole";
1010

1111

12-
export const UserMenu = ({user, config, actions}) => {
12+
export const UserMenu = ({user, actions}) => {
1313
const navigate = useNavigate();
1414

1515
const [dropDownActive, setDropDownActive] = useState(false);

client/src/pages/Application.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ export const Application = () => {
7373
header: "",
7474
mapper: role => role.unknownInManage ? <div className="role-icon unknown-in-manage"><AlertLogo/></div> :
7575
<div className="role-icon">
76-
{/*ToDo check if this role.log works*/}
7776
{typeof role.logo === "string" ? <img src={role.logo} alt="logo"/> : role.logo}
7877
</div>
7978
},

client/src/pages/RoleForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ export const RoleForm = () => {
525525
{!isEmpty(deletedUserRoles) && <div className="consequences">
526526
<p>{I18n.t("roles.consequences.info")}</p>
527527
<ul>
528-
{deletedUserRoles.slice(0, CUT_OFF_DELETED_USER).map(userRole => <li>
528+
{deletedUserRoles.slice(0, CUT_OFF_DELETED_USER).map((userRole, index) => <li key={index}>
529529
{I18n.t("roles.consequences.userInfo", {
530530
name: userRole.userInfo.name,
531531
authority: I18n.t(`access.${userRole.authority}`),

client/src/stores/AppStore.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,4 @@ export const useAppStore = create(set => ({
2525
clearFlash: () => set({flash: {}}),
2626
//[{path: "/roles/4", value: role.name}]
2727
breadcrumbPath: []
28-
}));
29-
30-
export const useManageStore = create(set => ({
31-
providers: [],
32-
provisionings: [],
33-
providerById: {}
3428
}));

client/src/tabs/Applications.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ const Applications = () => {
5050
header: "",
5151
nonSortable: true,
5252
mapper: application => <div className="role-icon">
53-
{/*ToDo check if this works*/}
5453
{typeof application.logo === "string" ? <img src={application.logo} alt="logo"/> : application.logo}
5554
</div>
5655
},

client/src/tabs/Cron.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const Cron = () => {
4343
</div>
4444
{!isEmpty(mailResults) &&
4545
<div className="cron-results">
46-
{mailResults["mails"].map(mail => <div className="mail-content">
46+
{mailResults["mails"].map((mail, index) => <div key={index} className="mail-content">
4747
<p dangerouslySetInnerHTML={{
4848
__html: DOMPurify.sanitize(mail)
4949
}}/>

client/src/tabs/Roles.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ export const Roles = () => {
8989
const logo = institution["logo"]
9090
return (
9191
<div className="institution-admin-welcome">
92-
{/*ToDo check if this works*/}
9392
{logo ? <img src={logo} alt="logo"/> : <VoidImage/>}
9493
<p>{I18n.t("institutionAdmin.welcome", {name: name})}</p>
9594
<Button txt={I18n.t("institutionAdmin.create")}
@@ -107,7 +106,6 @@ export const Roles = () => {
107106
header: "",
108107
mapper: role => role.unknownInManage ? <div className="role-icon unknown-in-manage"><AlertLogo/></div> :
109108
<div className="role-icon">
110-
{/*ToDo check if this works*/}
111109
{typeof role.logo === "string" ? <img src={role.logo} alt="logo"/> : role.logo}
112110
</div>
113111
},

0 commit comments

Comments
 (0)