kaori пре 4 година
родитељ
комит
ba0b8e7a75
1 измењених фајлова са 5 додато и 5 уклоњено
  1. 5 5
      packages/app/src/components/InAppNotification/InAppNotificationPage.tsx

+ 5 - 5
packages/app/src/components/InAppNotification/InAppNotificationPage.tsx

@@ -23,9 +23,9 @@ const InAppNotificationPageBody: FC<Props> = (props) => {
   const { data: inAppNotificationData } = useSWRxInAppNotifications(limit, offset);
   const { data: inAppNotificationData } = useSWRxInAppNotifications(limit, offset);
 
 
 
 
-  const [activeUnopenedPage, setActiveUnopenedPage] = useState(1);
-  const UnopenedOffset = (activeUnopenedPage - 1) * limit;
-  const { data: unopendinAppNotificationData } = useSWRxInAppNotifications(limit, UnopenedOffset, InAppNotificationStatuses.STATUS_UNOPENED);
+  const [activeUnopenedNotificationPage, setActiveUnopenedPage] = useState(1);
+  const UnopenedNotificationOffset = (activeUnopenedNotificationPage - 1) * limit;
+  const { data: unopendNotificationData } = useSWRxInAppNotifications(limit, UnopenedNotificationOffset, InAppNotificationStatuses.STATUS_UNOPENED);
   const { t } = useTranslation();
   const { t } = useTranslation();
 
 
   if (inAppNotificationData == null) {
   if (inAppNotificationData == null) {
@@ -78,9 +78,9 @@ const InAppNotificationPageBody: FC<Props> = (props) => {
             {t('in_app_notification.mark_all_as_read')}
             {t('in_app_notification.mark_all_as_read')}
           </button>
           </button>
         </div>
         </div>
-        <InAppNotificationList inAppNotificationData={unopendinAppNotificationData} />
+        <InAppNotificationList inAppNotificationData={unopendNotificationData} />
         <PaginationWrapper
         <PaginationWrapper
-          activePage={activeUnopenedPage}
+          activePage={activeUnopenedNotificationPage}
           changePage={setUnopenedPageNumber}
           changePage={setUnopenedPageNumber}
           totalItemsCount={inAppNotificationData.totalDocs}
           totalItemsCount={inAppNotificationData.totalDocs}
           pagingLimit={inAppNotificationData.limit}
           pagingLimit={inAppNotificationData.limit}