Skip to content

Commit

Permalink
fix: removed connection tab on user profile page (#3275)
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Taylor <nick@nickyt.co>
  • Loading branch information
beckyrich and nickytonline committed Apr 29, 2024
1 parent 4f4243c commit cbd1382
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 87 deletions.

This file was deleted.

Expand Up @@ -36,7 +36,6 @@ import SkeletonWrapper from "components/atoms/SkeletonLoader/skeleton-wrapper";
import { useToast } from "lib/hooks/useToast";
import { DATA_FALLBACK_VALUE } from "lib/utils/fallback-values";
import { DayRangePicker } from "components/shared/DayRangePicker";
import ConnectionRequestsWrapper from "../ConnectionRequestWrapper/connection-requests-wrapper";
import UserRepositoryRecommendations from "../UserRepositoryRecommendations/user-repository-recommendations";

interface ContributorProfileTabProps {
Expand All @@ -52,7 +51,7 @@ interface ContributorProfileTabProps {
range?: string;
}

type TabKey = "highlights" | "contributions" | "connections" | "recommendations";
type TabKey = "highlights" | "contributions" | "recommendations";

// Query Params type for this page
interface QueryParams {
Expand All @@ -62,7 +61,6 @@ interface QueryParams {
const tabs: Record<TabKey, string> = {
highlights: "Highlights",
contributions: "Contributions",
connections: "Connections",
recommendations: "Recommendations",
};

Expand Down Expand Up @@ -113,10 +111,7 @@ const ContributorProfileTab = ({
tab === "recommendations" &&
"font-bold text-transparent bg-clip-text bg-gradient-to-r from-[#EA4600] to-[#EB9B00]",
user && user_name !== login && tab === "recommendations" && "hidden",
user && user_name !== login && tab === "connections" && "hidden",
!user && tab === "recommendations" && "hidden",
!user && tab === "connections" && "hidden",
!receive_collaboration && tab === "connections" && "hidden"
!user && tab === "recommendations" && "hidden"
);
};

Expand Down Expand Up @@ -430,11 +425,6 @@ const ContributorProfileTab = ({

{user && user.user_metadata.user_name === login && (
<>
{/* Connection requests tab details */}
<TabsContent value={"connections" satisfies TabKey}>
<ConnectionRequestsWrapper />
</TabsContent>

{/* Recommendation tab details */}
<TabsContent value={"recommendations" satisfies TabKey}>
<UserRepositoryRecommendations contributor={contributor} userInterests={userInterests} />
Expand Down

0 comments on commit cbd1382

Please sign in to comment.