diff --git a/src/components/Body.tsx b/src/components/Body.tsx index 92f3f5b..e8af574 100644 --- a/src/components/Body.tsx +++ b/src/components/Body.tsx @@ -9,7 +9,7 @@ import TestBench from "./TestBench"; import { Compute, ComputeConsole } from "./Compute"; import { ProfileContext } from "./Profile/ProfileContext"; -import { isDev, isLocal } from "./utils"; +import { isDev, isFullPath, isLocal } from "./utils"; const Body = () => { const [searchParams, setSearchParams] = useSearchParams(); @@ -46,7 +46,7 @@ const Body = () => { const isLoggedIn = !!patreonData; - const showTestBench = isDev() && isLocal(); + const showTestBench = (isDev() && isLocal()) || isFullPath("/test"); const showClusterCompute = isLoggedIn; // || isDev(); const showClusterComputeConsole = false; // isLocal(); diff --git a/src/components/utils.ts b/src/components/utils.ts index adcdc44..491b83f 100644 --- a/src/components/utils.ts +++ b/src/components/utils.ts @@ -12,3 +12,8 @@ export const isLocal = () => { window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/), ); }; + +// Used for matching urls like /test +export const isFullPath = (target: string) => { + return window.location.pathname === target; +};