diff --git a/client/App.tsx b/client/App.tsx index bfd3ccb1..a233c209 100644 --- a/client/App.tsx +++ b/client/App.tsx @@ -161,6 +161,17 @@ import DeveloperPlatform from "./pages/dev-platform/DeveloperPlatform"; const queryClient = new QueryClient(); +// When the app is accessed via staff.aethex.tech, auto-redirect to /staff +// so the subdomain works as a proper alias for the staff section. +const StaffSubdomainRedirect = ({ children }: { children: React.ReactNode }) => { + const hostname = typeof window !== "undefined" ? window.location.hostname : ""; + if (hostname === "staff.aethex.tech" && !window.location.pathname.startsWith("/staff")) { + window.location.replace("/staff" + window.location.pathname + window.location.search); + return null; + } + return <>{children}; +}; + const DiscordActivityWrapper = ({ children }: { children: React.ReactNode }) => { const { isActivity } = useDiscordActivity(); @@ -181,6 +192,7 @@ const App = () => ( + @@ -655,6 +667,7 @@ const App = () => ( +