@@ -32,11 +32,8 @@ import { useOrgSettingsQuery } from "../data/organizations/org-settings-query";
3232import Modal , { ModalBaseFooter , ModalBody , ModalHeader } from "../components/Modal" ;
3333import { VideoSection } from "../onboarding/VideoSection" ;
3434import { trackVideoClick } from "../Analytics" ;
35- import { useSuggestedRepositories } from "../data/git-providers/suggested-repositories-query" ;
36- import { useUserLoader } from "../hooks/use-user-loader" ;
3735import { cn } from "@podkit/lib/cn" ;
3836import { useInstallationConfiguration } from "../data/installation/default-workspace-image-query" ;
39- import PillLabel from "../components/PillLabel" ;
4037
4138const WorkspacesPage : FunctionComponent = ( ) => {
4239 const [ limit , setLimit ] = useState ( 50 ) ;
@@ -51,8 +48,6 @@ const WorkspacesPage: FunctionComponent = () => {
5148 const { data : org } = useCurrentOrg ( ) ;
5249 const { data : orgSettings } = useOrgSettingsQuery ( ) ;
5350
54- const { user } = useUserLoader ( ) ;
55-
5651 const { toast } = useToast ( ) ;
5752
5853 // Sort workspaces into active/inactive groups
@@ -78,21 +73,6 @@ const WorkspacesPage: FunctionComponent = () => {
7873 const { data : installationConfig } = useInstallationConfiguration ( ) ;
7974 const isDedicatedInstallation = ! ! installationConfig ?. isDedicatedInstallation ;
8075
81- const { data : suggestedRepos } = useSuggestedRepositories ( { excludeConfigurations : false } ) ;
82-
83- const recentRepos = useMemo ( ( ) => {
84- return (
85- suggestedRepos
86- ?. filter ( ( repo ) => {
87- const autostartMatch = user ?. workspaceAutostartOptions . find ( ( option ) => {
88- return option . cloneUrl . includes ( repo . url ) ;
89- } ) ;
90- return autostartMatch ;
91- } )
92- . slice ( 0 , 3 ) ?? [ ]
93- ) ;
94- } , [ suggestedRepos , user ] ) ;
95-
9676 const { filteredActiveWorkspaces, filteredInactiveWorkspaces } = useMemo ( ( ) => {
9777 const filteredActiveWorkspaces = activeWorkspaces . filter (
9878 ( info ) =>
@@ -191,46 +171,6 @@ const WorkspacesPage: FunctionComponent = () => {
191171 </ Card >
192172 </ div >
193173
194- { recentRepos . length > 0 && (
195- < >
196- < Subheading className = "font-semibold text-pk-content-primary pt-8 mb-2 lg:px-28 px-4" >
197- Suggested
198- </ Subheading >
199-
200- < div className = "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 lg:px-28 px-4" >
201- { [
202- ...recentRepos ,
203- // todo: add org-selected repos
204- ]
205- . slice ( 0 , 3 )
206- . map ( ( repo ) => (
207- < Card
208- key = { repo . url }
209- href = { `/new#${ repo . url } ` }
210- className = "border-[#D79A45] border hover:bg-pk-surface-tertiary transition-colors w-full"
211- >
212- < div className = "min-w-0 w-full space-y-1.5" >
213- < CardTitle className = "flex flex-row items-center gap-2 w-full" >
214- < span className = "truncate block min-w-0 text-base" >
215- { repo . configurationName || repo . repoName }
216- </ span >
217- < PillLabel
218- className = "capitalize bg-kumquat-light shrink-0 text-sm"
219- type = "warn"
220- >
221- Recommended
222- </ PillLabel >
223- </ CardTitle >
224- < CardDescription className = "truncate text-sm opacity-75" >
225- { repo . url }
226- </ CardDescription >
227- </ div >
228- </ Card >
229- ) ) }
230- </ div >
231- </ >
232- ) }
233-
234174 < Modal
235175 visible = { isVideoModalVisible }
236176 onClose = { handleVideoModalClose }
0 commit comments