瀏覽代碼

clean code

kaori 4 年之前
父節點
當前提交
3ff546dfee
共有 1 個文件被更改,包括 2 次插入14 次删除
  1. 2 14
      packages/app/src/components/InAppNotification/AllInAppNotifications.tsx

+ 2 - 14
packages/app/src/components/InAppNotification/AllInAppNotifications.tsx

@@ -1,17 +1,10 @@
 import React, { FC } from 'react';
 
-import AppContainer from '../../client/services/AppContainer';
-
 import InAppNotificationList from './InAppNotificationList';
-import { withUnstatedContainers } from '../UnstatedUtils';
 import { useSWRxInAppNotifications } from '../../stores/in-app-notification';
 
-type Props = {
-  appContainer: AppContainer,
-
-};
 
-const AllInAppNotifications: FC<Props> = (props: Props) => {
+const AllInAppNotifications: FC = () => {
   const limit = 6;
   const { data: inAppNotificationData } = useSWRxInAppNotifications(limit);
 
@@ -20,9 +13,4 @@ const AllInAppNotifications: FC<Props> = (props: Props) => {
   );
 };
 
-/**
- * Wrapper component for using unstated
- */
-const AllInAppNotificationsWrapper = withUnstatedContainers(AllInAppNotifications, [AppContainer]);
-
-export default AllInAppNotificationsWrapper;
+export default AllInAppNotifications;