From ba639db31f2ed89efd32c69b803f1e82fe19367c Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Thu, 20 Jul 2023 16:24:34 +0800 Subject: [PATCH] revert push notification on rules page --- .../networking/queries/useGetRulesQuery.tsx | 2 +- packages/web/pages/settings/rules.tsx | 30 +++++++++---------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/web/lib/networking/queries/useGetRulesQuery.tsx b/packages/web/lib/networking/queries/useGetRulesQuery.tsx index ffd1cbab5..c193196b0 100644 --- a/packages/web/lib/networking/queries/useGetRulesQuery.tsx +++ b/packages/web/lib/networking/queries/useGetRulesQuery.tsx @@ -11,7 +11,7 @@ export enum RuleActionType { AddLabel = 'ADD_LABEL', Archive = 'ARCHIVE', MarkAsRead = 'MARK_AS_READ', - // SendNotification = 'SEND_NOTIFICATION', + SendNotification = 'SEND_NOTIFICATION', } export interface Rule { diff --git a/packages/web/pages/settings/rules.tsx b/packages/web/pages/settings/rules.tsx index 9126461e8..3af6e00d3 100644 --- a/packages/web/pages/settings/rules.tsx +++ b/packages/web/pages/settings/rules.tsx @@ -1,26 +1,22 @@ +import { Button, Form, Input, Modal, Select, Space, Table, Tag } from 'antd' +// import 'antd/dist/antd.dark.css' +import 'antd/dist/antd.compact.css' import { useCallback, useMemo, useState } from 'react' import { Toaster } from 'react-hot-toast' - -import { showErrorToast, showSuccessToast } from '../../lib/toastHelpers' -import { applyStoredTheme } from '../../lib/themeUpdater' +import { Box, HStack } from '../../components/elements/LayoutPrimitives' +import { SettingsLayout } from '../../components/templates/SettingsLayout' +import { Label } from '../../lib/networking/fragments/labelFragment' +import { deleteRuleMutation } from '../../lib/networking/mutations/deleteRuleMutation' +import { setRuleMutation } from '../../lib/networking/mutations/setRuleMutation' +import { useGetLabelsQuery } from '../../lib/networking/queries/useGetLabelsQuery' import { Rule, RuleAction, RuleActionType, useGetRulesQuery, } from '../../lib/networking/queries/useGetRulesQuery' - -import { SettingsLayout } from '../../components/templates/SettingsLayout' -import { Button, Space, Table, Form, Input, Modal, Tag, Select } from 'antd' - -// import 'antd/dist/antd.dark.css' -import 'antd/dist/antd.compact.css' - -import { Box, HStack } from '../../components/elements/LayoutPrimitives' -import { useGetLabelsQuery } from '../../lib/networking/queries/useGetLabelsQuery' -import { Label } from '../../lib/networking/fragments/labelFragment' -import { setRuleMutation } from '../../lib/networking/mutations/setRuleMutation' -import { deleteRuleMutation } from '../../lib/networking/mutations/deleteRuleMutation' +import { applyStoredTheme } from '../../lib/themeUpdater' +import { showErrorToast, showSuccessToast } from '../../lib/toastHelpers' type CreateRuleModalProps = { isModalOpen: boolean @@ -324,7 +320,9 @@ export default function Rules(): JSX.Element { revalidate={revalidate} /> - +