Skip to content

armgit / ente

Public Imported from GitHub
0

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

moved apps to separate shared package

Abhinav60f2729d0fef
diff --git a/apps/photos/src/pages/login/index.tsx b/apps/photos/src/pages/login/index.tsx
index 98d6caf36c..e1519da1f4 100644
--- a/apps/photos/src/pages/login/index.tsx
+++ b/apps/photos/src/pages/login/index.tsx
@@ -2,7 +2,7 @@ import LoginPage from '@ente/accounts/pages/login';
import { useRouter } from 'next/router';
import { AppContext } from 'pages/_app';
import { useContext } from 'react';
-import { APPS } from '@ente/shared/constants/apps';
+import { APPS } from '@ente/shared/apps/constants';
export default function Login() {
const appContext = useContext(AppContext);
diff --git a/packages/accounts/pages/login.tsx b/packages/accounts/pages/login.tsx
index ceba4c745c..dc3352f38e 100644
--- a/packages/accounts/pages/login.tsx
+++ b/packages/accounts/pages/login.tsx
@@ -5,17 +5,17 @@ import { VerticallyCentered } from '@ente/shared/components/Container';
import { getData, LS_KEYS } from '@ente/shared/storage/localStorage';
import { PAGES } from '../constants/pages';
import FormPaper from '@ente/shared/components/Form/FormPaper';
-import { NextRouter } from 'next/router';
+import { PageProps } from '@ente/shared/apps/types';
-interface HomeProps {
- appContext: {
- showNavBar: (show: boolean) => void;
- };
- router: NextRouter;
+interface LoginPageProps extends PageProps {
appName: string;
}
-export default function Home({ appContext, router, appName }: HomeProps) {
+export default function LoginPage({
+ appContext,
+ router,
+ appName,
+}: LoginPageProps) {
const [loading, setLoading] = useState(true);
useEffect(() => {
diff --git a/packages/shared/constants/apps.ts b/packages/shared/apps/constants.ts
similarity index 100%
rename from packages/shared/constants/apps.ts
rename to packages/shared/apps/constants.ts
diff --git a/packages/shared/apps/types.ts b/packages/shared/apps/types.ts
new file mode 100644
index 0000000000..4c065d5a09
--- /dev/null
+++ b/packages/shared/apps/types.ts
@@ -0,0 +1,8 @@
+import { NextRouter } from 'next/router';
+
+export interface PageProps {
+ appContext: {
+ showNavBar: (show: boolean) => void;
+ };
+ router: NextRouter;
+}