Skip to content

The Open Source DocuSign Alternative.

remove dashboard and link bar

Timur Ercan759b864b14cb
diff --git a/apps/web/src/app/(dashboard)/documents/page.tsx b/apps/web/src/app/(dashboard)/documents/page.tsx
index f461d58e2..c36aa644d 100644
--- a/apps/web/src/app/(dashboard)/documents/page.tsx
+++ b/apps/web/src/app/(dashboard)/documents/page.tsx
@@ -18,6 +18,7 @@ import {
} from '~/components/(dashboard)/period-selector/types';
import { DocumentStatus } from '~/components/formatter/document-status';
+import { UploadDocument } from '../dashboard/upload-document';
import { DocumentsDataTable } from './data-table';
export type DocumentsPageProps = {
@@ -72,8 +73,8 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage
return (
<div className="mx-auto w-full max-w-screen-xl px-4 md:px-8">
- <h1 className="text-4xl font-semibold">All Documents</h1>
-
+ <UploadDocument />
+ <h1 className="mt-12 text-4xl font-semibold">Documents</h1>
<div className="mt-8 flex flex-wrap gap-x-4 gap-y-6">
<Tabs defaultValue={status}>
<TabsList>
@@ -115,16 +116,11 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage
<div className="flex flex-1 flex-wrap items-center justify-between gap-x-2 gap-y-4">
<PeriodSelector />
-
- <Button>
- <Plus className="-ml-1 mr-2 h-5 w-5" />
- Add Document
- </Button>
</div>
</div>
<div className="mt-8">
- {/* If we're viewing all documents for all time and there's nuffin we should should an add document component instead */}
+ {/* If we're viewing all documents for all time and there's nuffin we should should show an add document component instead */}
{isNoResults ? (
<DocumentDropzone className="min-h-[60vh] md:min-h-[40vh]" />
) : (
diff --git a/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx b/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx
index d0927c323..279b8ea43 100644
--- a/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx
+++ b/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx
@@ -14,18 +14,8 @@ export const DesktopNav = ({ className, ...props }: DesktopNavProps) => {
return (
<div className={cn('ml-8 hidden flex-1 gap-x-6 md:flex', className)} {...props}>
- <Link
- href="/dashboard"
- className={cn(
- 'text-muted-foreground focus-visible:ring-ring ring-offset-background rounded-md font-medium leading-5 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2',
- {
- 'text-foreground': pathname?.startsWith('/dashboard'),
- },
- )}
- >
- Dashboard
- </Link>
- <Link
+ {/* No Nav tabs while there is only one main page */}
+ {/* <Link
href="/documents"
className={cn(
'text-muted-foreground focus-visible:ring-ring ring-offset-background rounded-md font-medium leading-5 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 ',
@@ -35,14 +25,6 @@ export const DesktopNav = ({ className, ...props }: DesktopNavProps) => {
)}
>
Documents
- </Link>
- {/* <Link
- href="/settings/profile"
- className={cn('font-medium leading-5 text-[#A1A1AA] hover:opacity-80', {
- 'text-primary-foreground': pathname?.startsWith('/settings'),
- })}
- >
- Settings
</Link> */}
</div>
);
diff --git a/apps/web/src/components/forms/signin.tsx b/apps/web/src/components/forms/signin.tsx
index 449863e71..ae9540869 100644
--- a/apps/web/src/components/forms/signin.tsx
+++ b/apps/web/src/components/forms/signin.tsx
@@ -44,7 +44,7 @@ export const SignInForm = ({ className }: SignInFormProps) => {
await signIn('credentials', {
email,
password,
- callbackUrl: '/dashboard',
+ callbackUrl: '/documents',
}).catch((err) => {
console.error(err);
});
diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts
index 8aabb75ea..8c7405dbe 100644
--- a/apps/web/src/middleware.ts
+++ b/apps/web/src/middleware.ts
@@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server';
export default async function middleware(req: NextRequest) {
if (req.nextUrl.pathname === '/') {
- const redirectUrl = new URL('/dashboard', req.url);
+ const redirectUrl = new URL('/documents', req.url);
return NextResponse.redirect(redirectUrl);
}