Skip to content

Open-source status page, incident response and uptime monitoring

chore: feed options only for non-protected pages

Washington4ccfd9399ced
diff --git a/apps/web/src/app/status-page/[domain]/_components/header.tsx b/apps/web/src/app/status-page/[domain]/_components/header.tsx
index 0114503c8..dd59dfbaa 100644
--- a/apps/web/src/app/status-page/[domain]/_components/header.tsx
+++ b/apps/web/src/app/status-page/[domain]/_components/header.tsx
@@ -68,6 +68,7 @@ export function Header({ navigation, plan, page }: Props) {
plan={plan}
slug={page.slug}
customDomain={page.customDomain}
+ passwordProtected={page.passwordProtected}
/>
</div>
</div>
diff --git a/apps/web/src/app/status-page/[domain]/_components/subscribe-button.tsx b/apps/web/src/app/status-page/[domain]/_components/subscribe-button.tsx
index 395e11780..48a9bf28e 100644
--- a/apps/web/src/app/status-page/[domain]/_components/subscribe-button.tsx
+++ b/apps/web/src/app/status-page/[domain]/_components/subscribe-button.tsx
@@ -20,6 +20,7 @@ interface Props {
plan: WorkspacePlan;
slug: string;
customDomain?: string;
+ passwordProtected?: boolean | null;
isDemo?: boolean;
}
@@ -27,6 +28,7 @@ export function SubscribeButton({
plan,
slug,
customDomain,
+ passwordProtected = false,
isDemo = false,
}: Props) {
const [showModal, setShowModal] = useState(false);
@@ -46,28 +48,32 @@ export function SubscribeButton({
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
- <DropdownMenuItem asChild>
- <a
- href={`${baseUrl}/feed/rss`}
- target="_blank"
- rel="noreferrer"
- className="flex items-center gap-2"
- >
- <Rss className="h-4 w-4" />
- RSS
- </a>
- </DropdownMenuItem>
- <DropdownMenuItem asChild>
- <a
- href={`${baseUrl}/feed/atom`}
- target="_blank"
- rel="noreferrer"
- className="flex items-center gap-2"
- >
- <Rss className="h-4 w-4" />
- Atom
- </a>
- </DropdownMenuItem>
+ {!passwordProtected ? (
+ <>
+ <DropdownMenuItem asChild>
+ <a
+ href={`${baseUrl}/feed/rss`}
+ target="_blank"
+ rel="noreferrer"
+ className="flex items-center gap-2"
+ >
+ <Rss className="h-4 w-4" />
+ RSS
+ </a>
+ </DropdownMenuItem>
+ <DropdownMenuItem asChild>
+ <a
+ href={`${baseUrl}/feed/atom`}
+ target="_blank"
+ rel="noreferrer"
+ className="flex items-center gap-2"
+ >
+ <Rss className="h-4 w-4" />
+ Atom
+ </a>
+ </DropdownMenuItem>
+ </>
+ ) : null}
{isSubscribers ? (
<DropdownMenuItem onClick={() => setShowModal(true)}>
<Mail className="h-4 w-4 mr-2" />