feat: 💄 move document select and pagination outside of scroll container

This commit is contained in:
RaviAnand Mohabir 2025-04-08 19:04:00 +02:00
parent c7b299624e
commit 031ac2bacf

View File

@ -521,12 +521,10 @@ function Organizrr() {
<AppShell.Aside p="md" bg="var(--mantine-primary-color-0)">
<AppShell.Section>
<Group style={{ alignSelf: "start" }}>
<IconEye /> <Title order={3}>Preview</Title>
</Group>
</AppShell.Section>
<AppShell.Section grow my="md" component={ScrollArea}>
<Stack align="center">
<Stack>
<Group style={{ alignSelf: "start" }}>
<IconEye /> <Title order={3}>Preview</Title>
</Group>
<Select
label="Select file"
data={form.values.documents.map(({ id, file }) => ({
@ -536,6 +534,10 @@ function Organizrr() {
value={activeDocumentId}
onChange={setActiveDocumentId}
/>
</Stack>
</AppShell.Section>
<AppShell.Section grow my="md" component={ScrollArea}>
<Stack align="center">
{activeDocument &&
activeDocument.file.name.toLowerCase().endsWith(".pdf") && (
<>
@ -547,15 +549,21 @@ function Organizrr() {
<Page pageNumber={pageNumber} scale={0.8} />
</Document>
</ScrollArea>
<Pagination
value={pageNumber}
onChange={setPageNumber}
total={numPages ?? 0}
/>
</>
)}
</Stack>
</AppShell.Section>
<AppShell.Section>
{activeDocument && (
<Stack align="center">
<Pagination
value={pageNumber}
onChange={setPageNumber}
total={numPages ?? 0}
/>
</Stack>
)}
</AppShell.Section>
</AppShell.Aside>
<AppShell.Footer p="md">