{truncateName(activity?.name)}
@@ -113,13 +104,33 @@ export const FollowActivitiesPanel = ({
/>
))}
+ {hasMore && (
+
+ )}
-
-
-
- {t('__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_HINT_TEXT')}
-
-
);
};
diff --git a/src/pages/Profile/parts/FollowActivitiesAccordion.tsx/FollowCampaignActivitiesPanel.tsx b/src/pages/Profile/parts/FollowActivitiesAccordion.tsx/FollowCampaignActivitiesPanel.tsx
new file mode 100644
index 000000000..b5bcd6c3e
--- /dev/null
+++ b/src/pages/Profile/parts/FollowActivitiesAccordion.tsx/FollowCampaignActivitiesPanel.tsx
@@ -0,0 +1,137 @@
+import {
+ Anchor,
+ Label,
+ SM,
+ useToast,
+ Notification,
+ Button,
+} from '@appquality/unguess-design-system';
+import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import { ReactComponent as ChevronDown } from 'src/assets/icons/chevron-down-stroke.svg';
+import { ReactComponent as ChevronUp } from 'src/assets/icons/chevron-up-stroke.svg';
+import { appTheme } from 'src/app/theme';
+
+import {
+ GetUsersMeWatchedCampaignsApiResponse,
+ useDeletePlansByPidWatchersAndProfileIdMutation,
+ useGetUsersMeQuery,
+} from 'src/features/api';
+import { UnfollowButton } from './UnfollowButton';
+import { StyledActivityItem, StyledPanelSectionContainer } from './components';
+
+export const FollowCampaignActivitiesPanel = ({
+ followedCampaigns,
+}: {
+ followedCampaigns: GetUsersMeWatchedCampaignsApiResponse['items'];
+}) => {
+ const { t } = useTranslation();
+ const { addToast } = useToast();
+ const { data: userData } = useGetUsersMeQuery();
+ const [unfollowPlan] = useDeletePlansByPidWatchersAndProfileIdMutation();
+ const [isExpanded, setIsExpanded] = useState(false);
+
+ const displayedActivities = isExpanded
+ ? followedCampaigns
+ : followedCampaigns.slice(0, 3);
+ const hasMore = followedCampaigns.length > 3;
+ const remainingCount = followedCampaigns.length - 3;
+
+ const truncateName = (
+ name: string | undefined,
+ maxLength: number = 40
+ ): string => {
+ if (!name) return '';
+ return name.length > maxLength
+ ? `${name.substring(0, maxLength)}...`
+ : name;
+ };
+
+ const handleUnfollow = async (planId: number) => {
+ try {
+ await unfollowPlan({
+ pid: planId.toString(),
+ profileId: userData?.profile_id.toString() ?? '',
+ }).unwrap();
+
+ addToast(
+ ({ close }) => (
+
+ ),
+ { placement: 'top' }
+ );
+ } catch (error) {
+ addToast(
+ ({ close }) => (
+
+ ),
+ { placement: 'top' }
+ );
+ }
+ };
+
+ return (
+
+
+
+ {displayedActivities.map((activity) => (
+
+
+
+ {truncateName(activity?.name)}
+
+
{activity?.project?.name}
+
+
+
+ ))}
+ {hasMore && (
+
+ )}
+
+
+ );
+};
diff --git a/src/pages/Profile/parts/FollowActivitiesAccordion.tsx/NotificationSettingsEmptyState.tsx b/src/pages/Profile/parts/FollowActivitiesAccordion.tsx/NotificationSettingsEmptyState.tsx
new file mode 100644
index 000000000..d01280e75
--- /dev/null
+++ b/src/pages/Profile/parts/FollowActivitiesAccordion.tsx/NotificationSettingsEmptyState.tsx
@@ -0,0 +1,32 @@
+import { Hint, Label, LG } from '@appquality/unguess-design-system';
+import { useTranslation } from 'react-i18next';
+import { appTheme } from 'src/app/theme';
+import { ReactComponent as EmptyState } from 'src/assets/empty-monitoring.svg';
+
+export const NotificationSettingsEmptyState = () => {
+ const { t } = useTranslation();
+ return (
+
+
+
+
+ {t(
+ '__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_EMPTY_STATE_HINT'
+ )}
+
+
+ );
+};
diff --git a/src/pages/Profile/parts/FollowActivitiesAccordion.tsx/UnfollowButton.tsx b/src/pages/Profile/parts/FollowActivitiesAccordion.tsx/UnfollowButton.tsx
index 18386db1f..5e97b0555 100644
--- a/src/pages/Profile/parts/FollowActivitiesAccordion.tsx/UnfollowButton.tsx
+++ b/src/pages/Profile/parts/FollowActivitiesAccordion.tsx/UnfollowButton.tsx
@@ -16,7 +16,6 @@ const UnfollowButton = ({