@@ -15,7 +15,6 @@ import {
1515 Table ,
1616 Text ,
1717 TextInput ,
18- Title ,
1918 Tooltip ,
2019 UnstyledButton ,
2120} from "@mantine/core" ;
@@ -39,6 +38,7 @@ import { useDocuments } from "../data/hooks/useDocuments";
3938import { useDocumentThumbnails } from "../data/hooks/useDocumentThumbnails" ;
4039import type { Document , DocumentStatus } from "../shared/types" ;
4140import { formatDate , formatFileSize } from "../shared/utils" ;
41+ import { PageHeader } from "../ui" ;
4242
4343const statusOptions : { value : DocumentStatus | "all" ; label : string } [ ] = [
4444 { value : "all" , label : "All statuses" } ,
@@ -188,31 +188,29 @@ export function DocumentsPage() {
188188 return (
189189 < >
190190 < Stack gap = "lg" >
191- < Group justify = "space-between" >
192- < div >
193- < Title order = { 2 } > Documents</ Title >
194- < Text size = "sm" c = "dimmed" >
195- View and manage all documents in your group
196- </ Text >
197- </ div >
198- < Group gap = "xs" >
199- < Tooltip label = { statsOpen ? "Hide stats" : "Show stats" } >
200- < ActionIcon variant = "light" onClick = { toggleStats } size = "lg" >
201- < IconChartBar size = { 18 } />
202- </ ActionIcon >
203- </ Tooltip >
204- < Tooltip label = "Refresh now" >
205- < ActionIcon
206- variant = "light"
207- onClick = { ( ) => refetch ( ) }
208- loading = { isFetching }
209- size = "lg"
210- >
211- < IconRefresh size = { 18 } />
212- </ ActionIcon >
213- </ Tooltip >
214- </ Group >
215- </ Group >
191+ < PageHeader
192+ title = "Documents"
193+ description = "View and manage all documents in your group"
194+ actions = {
195+ < Group gap = "xs" >
196+ < Tooltip label = { statsOpen ? "Hide stats" : "Show stats" } >
197+ < ActionIcon variant = "light" onClick = { toggleStats } size = "lg" >
198+ < IconChartBar size = { 18 } />
199+ </ ActionIcon >
200+ </ Tooltip >
201+ < Tooltip label = "Refresh now" >
202+ < ActionIcon
203+ variant = "light"
204+ onClick = { ( ) => refetch ( ) }
205+ loading = { isFetching }
206+ size = "lg"
207+ >
208+ < IconRefresh size = { 18 } />
209+ </ ActionIcon >
210+ </ Tooltip >
211+ </ Group >
212+ }
213+ />
216214
217215 < Collapse in = { statsOpen } >
218216 < SimpleGrid cols = { { base : 1 , sm : 2 , md : 4 , lg : 6 } } >
0 commit comments