feature/IO-3096-GlobalNotifications - Code Review Part 1

This commit is contained in:
Dave Richer
2025-03-03 22:14:33 -05:00
parent b9df4c2587
commit a57abec81b
34 changed files with 124 additions and 77 deletions

View File

@@ -1,6 +1,6 @@
import { useMutation, useQuery } from "@apollo/client";
import { useEffect, useState } from "react";
import { Button, Card, Checkbox, Form, Table } from "antd";
import { Button, Card, Checkbox, Form, Space, Table } from "antd";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -165,14 +165,15 @@ function NotificationSettingsForm({ currentUser }) {
<Card
title={t("notifications.labels.notificationscenarios")}
extra={
<>
<Button type="default" onClick={handleReset} disabled={!isDirty} style={{ marginRight: 8 }}>
<Space>
<Button type="default" onClick={handleReset} disabled={!isDirty}>
{t("general.actions.clear")}
</Button>
<Button type="primary" htmlType="submit" disabled={!isDirty} loading={saving}>
{t("notifications.labels.save")}
</Button>
</>
</Space>
}
>
<Table dataSource={dataSource} columns={columns} pagination={false} bordered rowKey="key" />

View File

@@ -9,7 +9,7 @@ import { logImEXEvent, updateCurrentPassword } from "../../firebase/firebase.uti
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
import NotificationSettingsForm from "./notification-settings.component.jsx";
import { useSocket } from "../../contexts/SocketIO/socketContext.jsx";
import { useSocket } from "../../contexts/SocketIO/useSocket.jsx";
const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser