Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat: redirect to /dashboard

Marc Seitz33f65b962766
diff --git a/components/sidebar/app-sidebar.tsx b/components/sidebar/app-sidebar.tsx
index 8d582426..081d68b8 100644
--- a/components/sidebar/app-sidebar.tsx
+++ b/components/sidebar/app-sidebar.tsx
@@ -164,10 +164,10 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
>
<SidebarHeader className="gap-y-8">
<p className="hidden w-full justify-center text-2xl font-bold tracking-tighter text-black group-data-[collapsible=icon]:inline-flex dark:text-white">
- <Link href="/documents">P</Link>
+ <Link href="/dashboard">P</Link>
</p>
<p className="ml-2 flex items-center text-2xl font-bold tracking-tighter text-black group-data-[collapsible=icon]:hidden dark:text-white">
- <Link href="/documents">Papermark</Link>
+ <Link href="/dashboard">Papermark</Link>
{userPlan && !isFree && !isDataroomsPlus ? (
<span className="ml-4 rounded-full bg-background px-2.5 py-1 text-xs tracking-normal text-foreground ring-1 ring-gray-800">
{userPlan.charAt(0).toUpperCase() + userPlan.slice(1)}
diff --git a/components/teams/select-team.tsx b/components/teams/select-team.tsx
index 4b86d1c8..b6126727 100644
--- a/components/teams/select-team.tsx
+++ b/components/teams/select-team.tsx
@@ -22,7 +22,7 @@ const SelectTeam = ({ teams, currentTeam, isLoading }: TeamContextType) => {
const switchTeam = (team: Team) => {
localStorage.setItem("currentTeamId", team.id);
userTeam?.setCurrentTeam(team);
- router.push("/documents");
+ router.push("/dashboard");
};
return (
diff --git a/components/view/visitor-graph.tsx b/components/view/visitor-graph.tsx
index 7e72aabc..74ce783f 100644
--- a/components/view/visitor-graph.tsx
+++ b/components/view/visitor-graph.tsx
@@ -145,7 +145,7 @@ export default function ViewDurationSummary({
signIn("email", {
email: email,
redirect: false,
- callbackUrl: `/documents`,
+ callbackUrl: `/dashboard`,
}).then((res) => {
if (res?.ok && !res?.error) {
setEmail("");
diff --git a/lib/middleware/app.ts b/lib/middleware/app.ts
index 361a759e..c05eda8a 100644
--- a/lib/middleware/app.ts
+++ b/lib/middleware/app.ts
@@ -40,9 +40,9 @@ export default async function AppMiddleware(req: NextRequest) {
return NextResponse.redirect(new URL("/welcome", req.url));
}
- // AUTHENTICATED if the path is /login, redirect to "/documents"
+ // AUTHENTICATED if the path is /login, redirect to "/dashboard"
if (token?.email && path === "/login") {
- const nextPath = url.searchParams.get("next") || "/documents"; // Default redirection to "/documents" if no next parameter
+ const nextPath = url.searchParams.get("next") || "/dashboard"; // Default redirection to "/dashboard" if no next parameter
return NextResponse.redirect(
new URL(decodeURIComponent(nextPath), req.url),
);
diff --git a/next.config.mjs b/next.config.mjs
index 5da075aa..3da0a211 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -17,7 +17,7 @@ const nextConfig = {
return [
{
source: "/",
- destination: "/documents",
+ destination: "/dashboard",
permanent: false,
has: [
{