8
8
SidebarItem ,
9
9
SidebarLink ,
10
10
} from "components/FullPageLayout/Sidebar" ;
11
+ import { ScrollArea } from "components/ScrollArea/ScrollArea" ;
11
12
import { Spinner } from "components/Spinner/Spinner" ;
12
13
import {
13
14
WorkspaceBuildData ,
@@ -30,36 +31,40 @@ export const HistorySidebar: FC<HistorySidebarProps> = ({ workspace }) => {
30
31
return (
31
32
< Sidebar >
32
33
< SidebarCaption > History</ SidebarCaption >
33
- { builds
34
- ? builds . map ( ( build ) => (
35
- < SidebarLink
36
- target = "_blank"
37
- key = { build . id }
38
- to = { `/@${ build . workspace_owner_name } /${ build . workspace_name } /builds/${ build . build_number } ` }
39
- >
40
- < WorkspaceBuildData build = { build } />
41
- </ SidebarLink >
42
- ) )
43
- : Array . from ( { length : 15 } , ( _ , i ) => (
44
- < SidebarItem key = { i } >
45
- < WorkspaceBuildDataSkeleton />
46
- </ SidebarItem >
47
- ) ) }
48
- { buildsQuery . hasNextPage && (
49
- < div css = { { padding : 16 } } >
50
- < Button
51
- onClick = { ( ) => buildsQuery . fetchNextPage ( ) }
52
- disabled = { buildsQuery . isFetchingNextPage }
53
- variant = "outline"
54
- className = "w-full"
55
- >
56
- < Spinner loading = { buildsQuery . isFetchingNextPage } >
57
- < ArrowDownwardOutlined />
58
- </ Spinner >
59
- Show more builds
60
- </ Button >
34
+ < ScrollArea >
35
+ < div className = "flex flex-col gap-px" >
36
+ { builds
37
+ ? builds . map ( ( build ) => (
38
+ < SidebarLink
39
+ target = "_blank"
40
+ key = { build . id }
41
+ to = { `/@${ build . workspace_owner_name } /${ build . workspace_name } /builds/${ build . build_number } ` }
42
+ >
43
+ < WorkspaceBuildData build = { build } />
44
+ </ SidebarLink >
45
+ ) )
46
+ : Array . from ( { length : 15 } , ( _ , i ) => (
47
+ < SidebarItem key = { i } >
48
+ < WorkspaceBuildDataSkeleton />
49
+ </ SidebarItem >
50
+ ) ) }
51
+ { buildsQuery . hasNextPage && (
52
+ < div css = { { padding : 16 } } >
53
+ < Button
54
+ onClick = { ( ) => buildsQuery . fetchNextPage ( ) }
55
+ disabled = { buildsQuery . isFetchingNextPage }
56
+ variant = "outline"
57
+ className = "w-full"
58
+ >
59
+ < Spinner loading = { buildsQuery . isFetchingNextPage } >
60
+ < ArrowDownwardOutlined />
61
+ </ Spinner >
62
+ Show more builds
63
+ </ Button >
64
+ </ div >
65
+ ) }
61
66
</ div >
62
- ) }
67
+ </ ScrollArea >
63
68
</ Sidebar >
64
69
) ;
65
70
} ;
0 commit comments