Skip to content

Commit

Permalink
It's starting to work
Browse files Browse the repository at this point in the history
  • Loading branch information
aamirazad committed Jun 25, 2024
1 parent f1ee4be commit db22485
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 49 deletions.
30 changes: 0 additions & 30 deletions src/app/@modal/(.)/paperless-documents/modal.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions src/app/@modal/(.)/paperless-documents/page.tsx

This file was deleted.

7 changes: 7 additions & 0 deletions src/app/@modal/(.)paperless/document/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function DocumentPage({
params: { id },
}: {
params: { id: string };
}) {
return <div>{id}</div>;
}
2 changes: 1 addition & 1 deletion src/app/@modal/default.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function Default() {
export default function DefaultModal() {
return null;
}
Empty file added src/app/documents/[id]/page.tsx
Empty file.
4 changes: 4 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ export const metadata = {

export default function RootLayout({
children,
modal,
}: {
children: React.ReactNode;
modal: React.ReactNode;
}) {
return (
<ClerkProvider
Expand All @@ -40,6 +42,8 @@ export default function RootLayout({
{children}
</div>
</div>
{modal}
<div id="modal-root" />
</ThemeProvider>
</body>
</html>
Expand Down
2 changes: 2 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import OpenLinkInNewPage from "@/components/open-link-in-new-page";
import Link from "next/link";

export default async function HomePage() {
return (
Expand All @@ -13,6 +14,7 @@ export default async function HomePage() {
to get started.
</div>
<div>Or sign in to access the dashboard.</div>
<Link href="/documents/12">Buttom</Link>
</div>
</main>
);
Expand Down
11 changes: 4 additions & 7 deletions src/app/paperless/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,12 @@ function DocumentsPage() {
<ul className="list-disc">
{paperlessDocumentMap.map((document, index) => (
<li className="underline" key={index}>
<a
rel="noopener noreferrer"
target="_blank"
className="text-blue-600 underline hover:text-blue-800"
href={`${paperlessURL}/api/documents/${document.id}/preview/#search="${query}"`}
<Link
className="underline hover:text-slate-300"
href={`/documents/${document.id}`}
>
{document.title}
<ExternalLink size={16} className="mx-1 inline-block" />
</a>
</Link>
</li>
))}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions src/components/topnav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export function TopNav() {
{/* Desktop links */}
<div className="hidden h-full items-center rounded-r bg-slate-300 dark:bg-slate-700 md:flex">
<Link
href="paperless"
href="/paperless"
className={buttonVariants({ variant: "link" })}
>
Paperless-ngx
Expand Down Expand Up @@ -153,7 +153,7 @@ export function TopNav() {
<DropdownMenuLabel>Links</DropdownMenuLabel>
<DropdownMenuItem asChild>
<Link
href="paperless"
href="/paperless"
className={buttonVariants({ variant: "link" })}
>
Paperless-ngx
Expand Down

0 comments on commit db22485

Please sign in to comment.