diff --git a/src/pages/OldCommon/hooks/useCommonMembers.ts b/src/pages/OldCommon/hooks/useCommonMembers.ts index f07c8221f..c5aa04d91 100644 --- a/src/pages/OldCommon/hooks/useCommonMembers.ts +++ b/src/pages/OldCommon/hooks/useCommonMembers.ts @@ -1,6 +1,5 @@ import { useCallback, useRef, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { trace } from "firebase/performance"; import { CommonService, Logger, UserService } from "@/services"; import { store } from "@/shared/appConfig"; import { LoadingState } from "@/shared/interfaces"; @@ -11,7 +10,6 @@ import { selectUserStates, } from "@/store/states"; import { useDeepCompareEffect } from "react-use"; -import { perf } from "@/shared/utils/firebase"; interface Options { commonId?: string; @@ -113,9 +111,6 @@ export const useCommonMembers = ({ commonId }: Options): Return => { (async () => { try { - const useCommonMembersTrace = trace(perf, 'useCommonMembers'); - useCommonMembersTrace.start(); - const cachedUserStates = selectUserStates()(store.getState()); const hasUsersFromCache = commonMembers.some( ({ userId }) => cachedUserStates[userId]?.data, @@ -188,7 +183,6 @@ export const useCommonMembers = ({ commonId }: Options): Return => { }; }); dispatch(cacheActions.updateUserStates(fetchedUsers)); - useCommonMembersTrace.stop(); } catch (err) { Logger.error(err); setState((prevState) => ({ diff --git a/src/pages/PrivacyPolicy/PrivacyPolicy.tsx b/src/pages/PrivacyPolicy/PrivacyPolicy.tsx index 2cf9ad2e8..250154adb 100644 --- a/src/pages/PrivacyPolicy/PrivacyPolicy.tsx +++ b/src/pages/PrivacyPolicy/PrivacyPolicy.tsx @@ -5,10 +5,7 @@ import "./PrivacyPolicy.scss"; export function PrivacyPolicy() { return (
- + diff --git a/src/pages/PrivacyPolicy/index.ts b/src/pages/PrivacyPolicy/index.ts index be2600aaa..99313e752 100644 --- a/src/pages/PrivacyPolicy/index.ts +++ b/src/pages/PrivacyPolicy/index.ts @@ -1 +1 @@ -export * from "./PrivacyPolicy"; \ No newline at end of file +export * from "./PrivacyPolicy"; diff --git a/src/pages/common/components/CommonTabPanels/components/AboutTab/components/CommonProjects/components/Project/Project.tsx b/src/pages/common/components/CommonTabPanels/components/AboutTab/components/CommonProjects/components/Project/Project.tsx index c18a2b492..025b61089 100644 --- a/src/pages/common/components/CommonTabPanels/components/AboutTab/components/CommonProjects/components/Project/Project.tsx +++ b/src/pages/common/components/CommonTabPanels/components/AboutTab/components/CommonProjects/components/Project/Project.tsx @@ -17,13 +17,7 @@ interface ProjectProps { } const Project: FC = (props) => { - const { - title, - url, - imageURL, - imageAlt, - tooltipContent, - } = props; + const { title, url, imageURL, imageAlt, tooltipContent } = props; const contentEl = (
diff --git a/src/shared/hooks/useCases/useDiscussionMessagesById.ts b/src/shared/hooks/useCases/useDiscussionMessagesById.ts index 2dd45e70d..263a61112 100644 --- a/src/shared/hooks/useCases/useDiscussionMessagesById.ts +++ b/src/shared/hooks/useCases/useDiscussionMessagesById.ts @@ -1,7 +1,6 @@ import { useState, useCallback, useEffect, useRef } from "react"; import { useDispatch, useSelector } from "react-redux"; import { useDeepCompareEffect, useUpdateEffect } from "react-use"; -import { trace } from "firebase/performance"; import { DiscussionMessageService, MESSAGES_NUMBER_IN_BATCH, @@ -21,7 +20,7 @@ import { User, } from "@/shared/models"; import { InternalLinkData } from "@/shared/utils"; -import firebase, { perf } from "@/shared/utils/firebase"; +import firebase from "@/shared/utils/firebase"; import { cacheActions, selectDiscussionMessagesStateByDiscussionId, @@ -156,10 +155,7 @@ export const useDiscussionMessagesById = ({ const fetchRepliedMessages = useCallback( async (messageId: string, endDate: Date): Promise => { - const fetchRepliedMessagesTrace = trace(perf, 'fetchRepliedMessagesTrace'); try { - fetchRepliedMessagesTrace.start(); - if (state.data?.find((item) => item.id === messageId)) { return Promise.resolve(); } @@ -213,9 +209,8 @@ export const useDiscussionMessagesById = ({ updatedDiscussionMessages: discussionsWithText, }), ); - fetchRepliedMessagesTrace.stop(); } catch(err) { - fetchRepliedMessagesTrace.stop(); + // console.log(err); } }, [ @@ -250,9 +245,6 @@ export const useDiscussionMessagesById = ({ } try { - const fetchDiscussionMessagesTrace = trace(perf, 'fetchDiscussionMessages'); - fetchDiscussionMessagesTrace.start(); - unsubscribeRef.current = DiscussionMessageService.subscribeToDiscussionMessagesByDiscussionId( discussionId, lastVisible && lastVisible[discussionId], @@ -322,8 +314,7 @@ export const useDiscussionMessagesById = ({ setIsBatchLoading(false); }, ); - fetchDiscussionMessagesTrace.stop(); - } catch (err) { + } catch(err) { setIsBatchLoading(false); } }, [ diff --git a/src/shared/layouts/MultipleSpacesLayout/components/Header/components/Breadcrumbs/components/FeedItemBreadcrumbs/FeedItemBreadcrumbs.tsx b/src/shared/layouts/MultipleSpacesLayout/components/Header/components/Breadcrumbs/components/FeedItemBreadcrumbs/FeedItemBreadcrumbs.tsx index 1bc6ee189..f96140bc7 100644 --- a/src/shared/layouts/MultipleSpacesLayout/components/Header/components/Breadcrumbs/components/FeedItemBreadcrumbs/FeedItemBreadcrumbs.tsx +++ b/src/shared/layouts/MultipleSpacesLayout/components/Header/components/Breadcrumbs/components/FeedItemBreadcrumbs/FeedItemBreadcrumbs.tsx @@ -67,7 +67,7 @@ const FeedItemBreadcrumbs: FC = ({ }); return () => { - unsubscribe(); + unsubscribe && unsubscribe(); }; }, [breadcrumbs.activeItem?.id]);