Skip to content

Commit 8fa10f1

Browse files
committed
Don't add recommended repos to workspace list for now
Tool: gitpod/catfood.gitpod.cloud
1 parent 0adf6f7 commit 8fa10f1

File tree

1 file changed

+1
-65
lines changed

1 file changed

+1
-65
lines changed

components/dashboard/src/workspaces/Workspaces.tsx

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ import { useUpdateCurrentUserMutation } from "../data/current-user/update-mutati
3737
import { useUserLoader } from "../hooks/use-user-loader";
3838
import Tooltip from "../components/Tooltip";
3939
import { useFeatureFlag } from "../data/featureflag-query";
40-
import { useSuggestedRepositories } from "../data/git-providers/suggested-repositories-query";
41-
import PillLabel from "../components/PillLabel";
42-
import { SuggestedOrgRepository, useOrgSuggestedRepos } from "../data/organizations/suggested-repositories-query";
40+
import { useOrgSuggestedRepos } from "../data/organizations/suggested-repositories-query";
4341

4442
export const GETTING_STARTED_DISMISSAL_KEY = "workspace-list-getting-started";
4543

@@ -132,23 +130,8 @@ const WorkspacesPage: FunctionComponent = () => {
132130
}
133131
}, [user?.profile?.coachmarksDismissals]);
134132

135-
const { data: userSuggestedRepos } = useSuggestedRepositories({ excludeConfigurations: false });
136133
const { data: orgSuggestedRepos } = useOrgSuggestedRepos();
137134

138-
const suggestedRepos = useMemo(() => {
139-
const userSuggestions =
140-
userSuggestedRepos
141-
?.filter((repo) => {
142-
const autostartMatch = user?.workspaceAutostartOptions.find((option) => {
143-
return option.cloneUrl.includes(repo.url);
144-
});
145-
return autostartMatch;
146-
})
147-
.slice(0, 3) ?? [];
148-
const orgSuggestions = orgSuggestedRepos ?? [];
149-
return [...userSuggestions, ...orgSuggestions].slice(0, 3);
150-
}, [userSuggestedRepos, user, orgSuggestedRepos]);
151-
152135
const toggleGettingStarted = useCallback(
153136
(show: boolean) => {
154137
setShowGettingStarted(show);
@@ -257,53 +240,6 @@ const WorkspacesPage: FunctionComponent = () => {
257240
</Card>
258241
</div>
259242
)}
260-
261-
{suggestedRepos.length > 0 && (
262-
<>
263-
<Subheading className="font-semibold text-pk-content-primary mb-2 app-container">
264-
Suggested
265-
</Subheading>
266-
267-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 lg:px-28 px-4">
268-
{suggestedRepos.map((repo) => {
269-
const isOrgSuggested = (repo as SuggestedOrgRepository).orgSuggested ?? false;
270-
return (
271-
<Card
272-
key={repo.url}
273-
href={`/new#${repo.url}`}
274-
className={cn(
275-
"border-[0.5px] hover:bg-pk-surface-tertiary transition-colors w-full",
276-
{
277-
"border-[#D79A45]": isOrgSuggested,
278-
"border-pk-border-base": !isOrgSuggested,
279-
},
280-
)}
281-
>
282-
<div className="min-w-0 w-full space-y-1.5">
283-
<CardTitle className="flex flex-row items-center gap-2 w-full">
284-
<span className="truncate block min-w-0 text-base">
285-
{repo.configurationName || repo.repoName}
286-
</span>
287-
{isOrgSuggested && (
288-
<PillLabel
289-
className="capitalize bg-kumquat-light shrink-0 text-sm"
290-
type="warn"
291-
>
292-
Recommended
293-
</PillLabel>
294-
)}
295-
</CardTitle>
296-
<CardDescription className="truncate text-sm opacity-75">
297-
{repo.url}
298-
</CardDescription>
299-
</div>
300-
</Card>
301-
);
302-
})}
303-
</div>
304-
</>
305-
)}
306-
307243
<Modal
308244
visible={isVideoModalVisible}
309245
onClose={handleVideoModalClose}

0 commit comments

Comments
 (0)