From 273401e0bbb67b37b626e5ac03dae7748e2fb3ad Mon Sep 17 00:00:00 2001
From: sirpiglr <49359077-sirpiglr@users.noreply.replit.com>
Date: Mon, 8 Dec 2025 20:47:29 +0000
Subject: [PATCH] Add conditional rendering for Discord activity content
Introduce DiscordActivityWrapper component to conditionally render Activity page based on Discord presence.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 9be860f7-97e3-45a3-aec7-a3bc407d28ec
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/qPXTzuE
Replit-Helium-Checkpoint-Created: true
---
.replit | 4 ++++
client/App.tsx | 13 +++++++++++++
2 files changed, 17 insertions(+)
diff --git a/.replit b/.replit
index d96c59f0..740a1181 100644
--- a/.replit
+++ b/.replit
@@ -55,6 +55,10 @@ externalPort = 3000
localPort = 40437
externalPort = 3001
+[[ports]]
+localPort = 45639
+externalPort = 4200
+
[deployment]
deploymentTarget = "autoscale"
run = ["node", "dist/server/production.mjs"]
diff --git a/client/App.tsx b/client/App.tsx
index 1c95c759..bef2964e 100644
--- a/client/App.tsx
+++ b/client/App.tsx
@@ -6,6 +6,7 @@ import { createRoot } from "react-dom/client";
import { TooltipProvider } from "@/components/ui/tooltip";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { BrowserRouter, Routes, Route } from "react-router-dom";
+import { useDiscordActivity } from "./contexts/DiscordActivityContext";
import { AuthProvider } from "./contexts/AuthContext";
import { Web3Provider } from "./contexts/Web3Context";
import { DocsThemeProvider } from "./contexts/DocsThemeContext";
@@ -172,6 +173,16 @@ import StaffTeamHandbook from "./pages/staff/StaffTeamHandbook";
const queryClient = new QueryClient();
+const DiscordActivityWrapper = ({ children }: { children: React.ReactNode }) => {
+ const { isActivity } = useDiscordActivity();
+
+ if (isActivity) {
+ return ;
+ }
+
+ return <>{children}>;
+};
+
const App = () => (
@@ -182,6 +193,7 @@ const App = () => (
+
@@ -805,6 +817,7 @@ const App = () => (
+