|
@@ -3,15 +3,9 @@ import React, {
|
|
|
} from 'react';
|
|
} from 'react';
|
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
|
|
-import AppContainer from '~/client/services/AppContainer';
|
|
|
|
|
import { apiv3Get, apiv3Put } from '~/client/util/apiv3-client';
|
|
import { apiv3Get, apiv3Put } from '~/client/util/apiv3-client';
|
|
|
-import { withUnstatedContainers } from '../UnstatedUtils';
|
|
|
|
|
import { toastSuccess, toastError } from '~/client/util/apiNotification';
|
|
import { toastSuccess, toastError } from '~/client/util/apiNotification';
|
|
|
|
|
|
|
|
-type Props = {
|
|
|
|
|
- appContainer: AppContainer,
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
type SubscribeRule = {
|
|
type SubscribeRule = {
|
|
|
name: string,
|
|
name: string,
|
|
|
isEnabled: boolean,
|
|
isEnabled: boolean,
|
|
@@ -31,8 +25,7 @@ const isCheckedRule = (ruleName: string, subscribeRules: SubscribeRule[]) => (
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
-const InAppNotificationSettings: FC<Props> = (props: Props) => {
|
|
|
|
|
- const { appContainer } = props;
|
|
|
|
|
|
|
+const InAppNotificationSettings: FC = () => {
|
|
|
const { t } = useTranslation();
|
|
const { t } = useTranslation();
|
|
|
const [subscribeRules, setSubscribeRules] = useState<SubscribeRule[]>([]);
|
|
const [subscribeRules, setSubscribeRules] = useState<SubscribeRule[]>([]);
|
|
|
|
|
|
|
@@ -120,5 +113,4 @@ const InAppNotificationSettings: FC<Props> = (props: Props) => {
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const InAppNotificationSettingWrapper = withUnstatedContainers(InAppNotificationSettings, [AppContainer]);
|
|
|
|
|
-export default InAppNotificationSettingWrapper;
|
|
|
|
|
|
|
+export default InAppNotificationSettings;
|