Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: open help center articles properly
Marc Seitzbb3fd0fb09c0
diff --git a/components/profile-menu.tsx b/components/profile-menu.tsxindex 3ab093a4..8b69913d 100644--- a/components/profile-menu.tsx+++ b/components/profile-menu.tsx@@ -28,7 +28,7 @@ import { Skeleton } from "@/components/ui/skeleton";import { cn } from "@/lib/utils";-import { SearchCommand } from "./ search-command";+import { SearchCommand } from "./search-command";import UserRound from "./shared/icons/user-round";import { ModeToggle } from "./theme-toggle";@@ -183,7 +183,10 @@ const ProfileMenu = ({ className, size }: ProfileMenuProps) => {key={article.data.slug}value={article.data.title}onSelect={() => {- window.location.href = `${process.env.NEXT_PUBLIC_HELP_CENTER_URL}/help/article/${article.data.slug}`;+ window.open(+ `${process.env.NEXT_PUBLIC_MARKETING_URL}/help/article/${article.data.slug}`,+ "_blank",+ );setSearchOpen(false);}}>diff --git a/components/ search-command.tsx b/components/search-command.tsxsimilarity index 90%rename from components/ search-command.tsxrename to components/search-command.tsxindex 38ee7caf..0fea14d4 100644--- a/components/ search-command.tsx+++ b/components/search-command.tsx@@ -61,11 +61,11 @@ export function SearchCommand({key={article.data.slug}value={article.data.title}onSelect={() => {- const path =- locale === "en"- ? `/help/article/${article.data.slug}`- : `/${locale}/help/article/${article.data.slug}`;- window.location.href = `${process.env.NEXT_PUBLIC_HELP_CENTER_URL}${path}`;+ const path = `/help/article/${article.data.slug}`;+ window.open(+ `${process.env.NEXT_PUBLIC_MARKETING_URL}${path}`,+ "_blank",+ );onOpenChange?.(false);}}className="cursor-pointer rounded-lg hover:bg-slate-100 dark:hover:bg-slate-800"