moved apps to separate shared package
This commit is contained in:
parent
92e493c411
commit
60f2729d0f
|
@ -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);
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
8
packages/shared/apps/types.ts
Normal file
8
packages/shared/apps/types.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { NextRouter } from 'next/router';
|
||||
|
||||
export interface PageProps {
|
||||
appContext: {
|
||||
showNavBar: (show: boolean) => void;
|
||||
};
|
||||
router: NextRouter;
|
||||
}
|
Loading…
Reference in a new issue