diff --git a/src/pages/auth/index.tsx b/src/pages/auth/index.tsx new file mode 100644 index 00000000..8520e27f --- /dev/null +++ b/src/pages/auth/index.tsx @@ -0,0 +1,11 @@ +import type { NextPage } from 'next'; +import { Layout } from '../../presentation/layout/layout.container'; +import { Auth } from '../../presentation/relevant/auth/auth.page'; + +const AuthPage: NextPage = () => ( + + + +); + +export default AuthPage; diff --git a/src/presentation/layout/component/user-navigation-menu/user-navigation-menu.presenter.tsx b/src/presentation/layout/component/user-navigation-menu/user-navigation-menu.presenter.tsx index d8e9608e..ddbdc91f 100644 --- a/src/presentation/layout/component/user-navigation-menu/user-navigation-menu.presenter.tsx +++ b/src/presentation/layout/component/user-navigation-menu/user-navigation-menu.presenter.tsx @@ -73,7 +73,7 @@ export const UserNavigationMenu: FC ) : ( - + diff --git a/src/presentation/relevant/auth/auth.page.tsx b/src/presentation/relevant/auth/auth.page.tsx new file mode 100644 index 00000000..e0b236ca --- /dev/null +++ b/src/presentation/relevant/auth/auth.page.tsx @@ -0,0 +1,39 @@ +import Router from 'next/router'; +import { FC, useState } from 'react'; +import { FcGoogle } from 'react-icons/fc'; +import { Button, ButtonIcon } from '../../primitive/component/button/button.presenter'; +import { Card } from '../../primitive/component/card/card.presenter'; +import { loginWithGoogle } from '@/infra/firebase/auth'; + +export const Auth: FC = () => { + const [isLoading, setIsLoading] = useState(false); + + return ( + + + sign in / sign up + + + { + setIsLoading(true); + await loginWithGoogle().catch(() => { + setIsLoading(false); + }); + if (isLoading) { + Router.push('/auth/is-new-user'); + } + setIsLoading(false); + }} + > + + + + Googleでログインする + + + + ); +};