Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Add Documentation link to AppSidebar component

Bill Yang4bb9737a3c0e
diff --git a/client/src/components/AppSidebar.tsx b/client/src/components/AppSidebar.tsx
index fa0f062fc..8c85b50da 100644
--- a/client/src/components/AppSidebar.tsx
+++ b/client/src/components/AppSidebar.tsx
@@ -1,6 +1,6 @@
"use client";
-import { BarChart, Building2, HomeIcon, LogOut, Settings, ShieldUser, User } from "lucide-react";
+import { BarChart, BookOpen, Building2, HomeIcon, LogOut, Settings, ShieldUser, User } from "lucide-react";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { Suspense, useState } from "react";
@@ -60,6 +60,14 @@ function AppSidebarContent() {
active={false}
expanded={isExpanded}
/>
+ <SidebarLink
+ href="https://rybbit.com/docs"
+ icon={<BookOpen className="w-5 h-5" />}
+ label="Documentation"
+ target="_blank"
+ active={false}
+ expanded={isExpanded}
+ />
{/* <SidebarLink
href="/uptime/monitors"
icon={<SquareActivity className="w-5 h-5" />}
@@ -129,6 +137,7 @@ function SidebarLink({
label,
expanded = false,
onClick,
+ target,
}: {
active?: boolean;
href?: string;
@@ -136,6 +145,7 @@ function SidebarLink({
label?: string;
expanded?: boolean;
onClick?: () => void;
+ target?: string;
}) {
if (!href) {
return (
@@ -155,7 +165,7 @@ function SidebarLink({
}
return (
- <Link href={href} className="focus:outline-none">
+ <Link href={href} className="focus:outline-none" target={target}>
<div
className={cn(
"p-1 rounded-md transition-all duration-200 flex items-center gap-2",