@paro.io/expert-shared-components 1.4.9 → 1.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,7 +17,7 @@ type ProjectReviewsSectionProps = {
|
|
|
17
17
|
isInternal?: boolean;
|
|
18
18
|
createOrUpdateRating?: any;
|
|
19
19
|
getparoProjectsByClientIdDocument?: any;
|
|
20
|
-
projectIdToShow?:
|
|
20
|
+
projectIdToShow?: number;
|
|
21
21
|
};
|
|
22
22
|
export declare const calculateAverageRatings: (paroProjectsData: any[]) => {
|
|
23
23
|
overallRating: number;
|
|
@@ -102,7 +102,10 @@ const RatingHeader = ({ ratings, project, index, highlightedRatings, requestStat
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
(0, react_1.useEffect)(() => {
|
|
105
|
-
if (projectIdToShow) {
|
|
105
|
+
if (projectIdToShow === undefined || projectIdToShow === null) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (projectIdToShow >= 0) {
|
|
106
109
|
const headerToScrollTo = document.getElementById(`header_${projectIdToShow}`);
|
|
107
110
|
headerToScrollTo === null || headerToScrollTo === void 0 ? void 0 : headerToScrollTo.scrollIntoView({ behavior: 'smooth' });
|
|
108
111
|
toggleOpen(projectIdToShow);
|
|
@@ -9,7 +9,7 @@ interface ReviewsTabProps {
|
|
|
9
9
|
isClientPortal?: boolean;
|
|
10
10
|
isInternal?: boolean;
|
|
11
11
|
getparoProjectsByClientIdDocument?: any;
|
|
12
|
-
projectIdToShow?:
|
|
12
|
+
projectIdToShow?: number;
|
|
13
13
|
}
|
|
14
14
|
interface ToastNotificationProps {
|
|
15
15
|
color?: 'success' | 'info' | 'warning' | 'danger';
|