import { useEffect, useState } from "react";
import { useDiscordActivity } from "@/contexts/DiscordActivityContext";
import LoadingScreen from "@/components/LoadingScreen";
export default function Activity() {
const { isActivity, isLoading, user, error } = useDiscordActivity();
const [showContent, setShowContent] = useState(false);
useEffect(() => {
// Only show content if we're actually in a Discord Activity
// This is a one-time check - we don't navigate away
if (isActivity && !isLoading) {
setShowContent(true);
}
}, [isActivity, isLoading]);
if (isLoading) {
return (
{error}
💡 Open browser console (F12) and look for messages starting with{" "}
[Discord Activity]
Still having issues? Check the{" "} troubleshooting guide
This page is designed to run as a Discord Activity. Open it within Discord to get started!
Not in Discord? Visit the main app at{" "} aethex.dev
{error}
💡 Open Discord DevTools (Ctrl+Shift+I) and check the console for
messages starting with{" "}
[Discord Activity]
Discord Activity
Name: {user.full_name || "Not set"}
Username: {user.username || "Not set"}
Type: {user.user_type || "community_member"}
{user.bio && ("{user.bio}"
)}{user.primary_arm?.toUpperCase() || "LABS"}
Your primary realm determines your Discord role and access to realm-specific features.
💡 Discord Commands: Use{" "}
/profile
,{" "}
/set-realm
, and{" "}
/verify-role
{" "}
to manage your account directly in Discord.