From c0bb68398f8cfa41cfb020010b81d91ff039e384 Mon Sep 17 00:00:00 2001 From: OGBONNA SUNDAY <62995161+OgDev-01@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:48:21 +0100 Subject: [PATCH] refactor: update all collaboration copy to connection (#1831) --- .../NotificationsCard/notification-card.tsx | 4 +-- .../connection-card.tsx} | 8 ++--- .../connection-summary-card.tsx} | 22 ++++++------- .../contributor-profile-header.tsx | 18 +++++------ .../contributor-profile-info.tsx | 2 +- .../connection-requests-wrapper.tsx} | 19 ++++++------ .../contributor-profile-page.tsx | 2 +- .../contributor-profile-tab.tsx | 22 ++++++------- .../UserSettingsPage/user-settings-page.tsx | 6 ++-- ...ollaborations.ts => useUserConnections.ts} | 31 +++++++++---------- next-types.d.ts | 4 +-- pages/feed/index.tsx | 6 ++-- stories/atoms/notification-card.stories.tsx | 6 ++-- .../molecules/collaboration-card.stories.tsx | 10 +++--- .../collaboration-summary-card.stories.tsx | 12 +++---- 15 files changed, 85 insertions(+), 87 deletions(-) rename components/molecules/{CollaborationCard/collaboration-card.tsx => ConnectionCard/connection-card.tsx} (88%) rename components/molecules/{CollaborationSummaryCard/collaboration-summary-card.tsx => ConnectionSummaryCard/connection-summary-card.tsx} (62%) rename components/organisms/{CollaborationRequestWrapper/collaboration-requests-wrapper.tsx => ConnectionRequestWrapper/connection-requests-wrapper.tsx} (75%) rename lib/hooks/{useUserCollaborations.ts => useUserConnections.ts} (70%) diff --git a/components/atoms/NotificationsCard/notification-card.tsx b/components/atoms/NotificationsCard/notification-card.tsx index 3272248b96..9cefa3ba1c 100644 --- a/components/atoms/NotificationsCard/notification-card.tsx +++ b/components/atoms/NotificationsCard/notification-card.tsx @@ -5,7 +5,7 @@ import { FaRegSmile, FaUserCircle } from "react-icons/fa"; import { getNotificationURL } from "lib/utils/get-notification-url"; interface NotificationCard { - type: "highlight_reaction" | "follow" | "collaboration"; + type: "highlight_reaction" | "follow" | "connections"; message: string; id: string; } @@ -14,7 +14,7 @@ const NotificationCard = ({ type, message, id }: NotificationCard) => { const Icons = { highlight_reaction: FaRegSmile, follow: FaUserCircle, - collaboration: FaUserCircle, + connections: FaUserCircle, }; const Icon = Icons[type]; diff --git a/components/molecules/CollaborationCard/collaboration-card.tsx b/components/molecules/ConnectionCard/connection-card.tsx similarity index 88% rename from components/molecules/CollaborationCard/collaboration-card.tsx rename to components/molecules/ConnectionCard/connection-card.tsx index 5ffc35593c..c834894b7d 100644 --- a/components/molecules/CollaborationCard/collaboration-card.tsx +++ b/components/molecules/ConnectionCard/connection-card.tsx @@ -4,7 +4,7 @@ import Avatar from "components/atoms/Avatar/avatar"; import { getAvatarByUsername } from "lib/utils/github"; import Button from "components/atoms/Button/button"; -export interface CollaborationRequestObject extends React.ComponentProps<"div"> { +export interface ConnectionRequestObject extends React.ComponentProps<"div"> { requestor: DbUser; outreachMessage: string; requestId: string; @@ -12,14 +12,14 @@ export interface CollaborationRequestObject extends React.ComponentProps<"div"> onDecline: (id: string) => void; } -const CollaborationCard = ({ +const ConnectionCard = ({ requestor, outreachMessage, className, requestId, onAccept, onDecline, -}: CollaborationRequestObject) => { +}: ConnectionRequestObject) => { return (