Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

feat: add runningInBrowser to shared

httpjamesmca795906dd8e
diff --git a/apps/cast/src/constants/apps.ts b/apps/cast/src/constants/apps.ts
index 79e4e12322..c4284e2b86 100644
--- a/apps/cast/src/constants/apps.ts
+++ b/apps/cast/src/constants/apps.ts
@@ -1,6 +1,6 @@
+import { runningInBrowser } from '@ente/shared/apps/browser';
+import { getAlbumsURL, getAuthURL } from '@ente/shared/network/api';
import { PAGES } from 'constants/pages';
-import { runningInBrowser } from 'utils/common';
-import { getAlbumsURL, getAuthURL } from 'utils/common/apiUtil';
export enum APPS {
PHOTOS = 'PHOTOS',
diff --git a/packages/shared/apps/browser.ts b/packages/shared/apps/browser.ts
new file mode 100644
index 0000000000..ad34a00ffa
--- /dev/null
+++ b/packages/shared/apps/browser.ts
@@ -0,0 +1,3 @@
+export function runningInBrowser() {
+ return typeof window !== 'undefined';
+}