mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: replace import.meta.env.DEV checks with isDevEnv() utility function
This commit is contained in:
parent
c22bec6485
commit
c0d48a6b9d
8 changed files with 18 additions and 10 deletions
|
@ -36,6 +36,7 @@ import {
|
|||
preventUnload,
|
||||
resolvablePromise,
|
||||
isRunningInIframe,
|
||||
isDevEnv,
|
||||
} from "@excalidraw/excalidraw/utils";
|
||||
import {
|
||||
GithubIcon,
|
||||
|
@ -383,7 +384,7 @@ const ExcalidrawWrapper = () => {
|
|||
const [, forceRefresh] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (import.meta.env.DEV) {
|
||||
if (isDevEnv()) {
|
||||
const debugState = loadSavedDebugState();
|
||||
|
||||
if (debugState.enabled && !window.visualDebug) {
|
||||
|
|
|
@ -12,6 +12,7 @@ import { LanguageList } from "../app-language/LanguageList";
|
|||
import { isExcalidrawPlusSignedUser } from "../app_constants";
|
||||
|
||||
import { saveDebugState } from "./DebugCanvas";
|
||||
import { isDevEnv } from "@excalidraw/excalidraw/utils";
|
||||
|
||||
export const AppMainMenu: React.FC<{
|
||||
onCollabDialogOpen: () => any;
|
||||
|
@ -57,7 +58,7 @@ export const AppMainMenu: React.FC<{
|
|||
>
|
||||
{isExcalidrawPlusSignedUser ? "Sign in" : "Sign up"}
|
||||
</MainMenu.ItemLink>
|
||||
{import.meta.env.DEV && (
|
||||
{isDevEnv() && (
|
||||
<MainMenu.Item
|
||||
icon={eyeIcon}
|
||||
onClick={() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue