Skip to content

Commit

Permalink
Merge pull request #454 from memser-spaceport/staging
Browse files Browse the repository at this point in the history
Staging to Main
  • Loading branch information
madan-ideas2it authored Dec 20, 2024
2 parents 19833f9 + d51a565 commit 492dd99
Show file tree
Hide file tree
Showing 69 changed files with 1,980 additions and 2,423 deletions.
1 change: 0 additions & 1 deletion __tests__/page/home/featured/featured.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { render, screen, fireEvent } from '@testing-library/react';
import '@testing-library/jest-dom';
import { useHomeAnalytics } from '@/analytics/home.analytics';
import { getAnalyticsUserInfo, getAnalyticsMemberInfo, getAnalyticsProjectInfo, getAnalyticsTeamInfo } from '@/utils/common.utils';
import { PAGE_ROUTES } from '@/utils/constants';
import Featured from '@/components/page/home/featured/featured';

// Mocking dependencies
Expand Down
18 changes: 17 additions & 1 deletion analytics/members.analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,20 @@ export const useMemberAnalytics = () => {
captureEvent(MEMBER_ANALYTICS_EVENTS.MEMBER_DETAIL_BIO_EDIT_RECORD_SAVE, params);
}

function onClickSeeMoreIrlContribution(user: IAnalyticsUserInfo | null){
const params = {
user,
};
captureEvent(MEMBER_ANALYTICS_EVENTS.ON_CLICK_SEE_MORE_BUTTON_IRL_CONTRIBUTIONS, params);
}

function onClickEventIrlContribution(user: IAnalyticsUserInfo | null){
const params = {
user,
};
captureEvent(MEMBER_ANALYTICS_EVENTS.MEMBER_DETAILS_ON_CLICK_IRL_CONTRIBUTIONS, params);
}

return {
onOfficeHourClicked,
onProjectContributionEditClicked,
Expand Down Expand Up @@ -349,6 +363,8 @@ export const useMemberAnalytics = () => {
onMemberDetailsBioEditClicked,
onMemberDetailsBioEditSaveClicked,
onMemberDetailsBioEditCancelClicked,
recordBioSave
recordBioSave,
onClickSeeMoreIrlContribution,
onClickEventIrlContribution,
};
};
18 changes: 17 additions & 1 deletion analytics/teams.analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,20 @@ export const useTeamAnalytics = () => {
captureEvent(TEAMS_ANALYTICS_EVENTS.TEAM_DETAIL_ABOUT_SAVE, params);
}

function onClickSeeMoreIrlContribution(user: IAnalyticsUserInfo | null){
const params = {
user,
};
captureEvent(TEAMS_ANALYTICS_EVENTS.ON_CLICK_SEE_MORE_BUTTON_IRL_CONTRIBUTIONS, params);
}

function onClickTeamIrlContribution(user: IAnalyticsUserInfo | null){
const params = {
user,
};
captureEvent(TEAMS_ANALYTICS_EVENTS. TEAM_DETAILS_ON_CLICK_IRL_CONTRIBUTIONS, params);
}

return {
onOfficeHoursSelected,
onFriendsOfProtocolSelected,
Expand Down Expand Up @@ -287,7 +301,9 @@ export const useTeamAnalytics = () => {
onTeamDetailAboutEditSaveClicked,
onTeamDetailAboutEditCancelClicked,
onTeamDetailAboutEditClicked,
recordAboutSave
recordAboutSave,
onClickSeeMoreIrlContribution,
onClickTeamIrlContribution
}

}
5 changes: 4 additions & 1 deletion app/actions/members.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

import { IMemberListOptions } from "@/types/members.types";
import { getHeader } from "@/utils/common.utils";
import { handleHostAndSpeaker } from "@/utils/member.utils";

export const getMemberListForQuery = async (options: IMemberListOptions, currentPage: number, limit: number, authToken?: string) => {
const response = await fetch(`${process.env.DIRECTORY_API_URL}/v1/members?page=${currentPage}&limit=${limit}${options ? '&' + new URLSearchParams(options as any) : ''}`, {

handleHostAndSpeaker(options);
const response = await fetch(`${process.env.DIRECTORY_API_URL}/v1/members?page=${currentPage}&limit=${limit}${options ? '&' + new URLSearchParams(options as any) : ''}`, {
cache: 'force-cache',
method: 'GET',
next: { tags: ['member-list'] },
Expand Down
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const AuthBox = dynamic(() => import('@/components/core/login/auth-box'), { ssr:
const Toaster = dynamic(() => import('../components/core/toaster'), { ssr: false });
const BroadCastChannel = dynamic(() => import('@/components/core/login/broadcast-channel'), { ssr: false });
const MemberRegisterDialog = dynamic(() => import('@/components/core/register/member-register-dialog'), { ssr: false });
const TeamRegisterDialog = dynamic(() => import('@/components/page/team-form-info/team-register-dialog'), { ssr: false });
// const TeamRegisterDialog = dynamic(() => import('@/components/page/team-form-info/team-register-dialog'), { ssr: false });
const CookieChecker = dynamic(() => import('@/components/core/login/cookie-checker'), { ssr: false });
const PostHogPageview = dynamic(() => import('@/providers/analytics-provider').then((d) => d.PostHogPageview), { ssr: false });
const RatingContainer = dynamic(() => import('@/components/core/office-hours-rating/rating-container'), { ssr: false });
Expand Down Expand Up @@ -69,7 +69,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<BroadCastChannel />
<RatingContainer userInfo={userInfo} isLoggedIn={isLoggedIn} authToken={authToken} />
<MemberRegisterDialog />
<TeamRegisterDialog />
{/* <TeamRegisterDialog /> */}
<CookieChecker isLoggedIn={isLoggedIn} />
</StyledJsxRegistry>
</body>
Expand Down
Loading

0 comments on commit 492dd99

Please sign in to comment.