Skip to content

Instantly share code, notes, and snippets.

@timohausmann
Created May 25, 2023 14:38
Show Gist options
  • Save timohausmann/8e5d90a9c1d126a5a110901cc6eddb86 to your computer and use it in GitHub Desktop.
Save timohausmann/8e5d90a9c1d126a5a110901cc6eddb86 to your computer and use it in GitHub Desktop.
theatre.ts isStudioHidden
import type { IStudio } from '@theatre/studio';
export const theatre = { isInit: false };
export const studioHelper = {
isStudioHidden: (): boolean => {
if (process.env.NEXT_PUBLIC_VERCEL_ENV === 'production') {
return true;
} else if(theatre.isInit) {
const isHidden = (require('@theatre/studio').default as IStudio).ui.isHidden;
return isHidden;
} else {
return false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment