-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from 3I-shikosai32/feat/231-add_signout_page
サインアウトページ`/auth/sign-out`を作成した。他、修正
- Loading branch information
Showing
6 changed files
with
172 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { FC } from 'react'; | ||
import { Layout } from '@/presentation/layout/layout.container'; | ||
import { SignOutPage } from '@/presentation/relevant/auth/sign-out.page'; | ||
|
||
const IndexPage: FC = () => ( | ||
<Layout title="サインアウト | OZ"> | ||
<SignOutPage /> | ||
</Layout> | ||
); | ||
|
||
export default IndexPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Router from 'next/router'; | ||
import { useEffect } from 'react'; | ||
import type { FC } from 'react'; | ||
import { SignOut } from './sign-out.presenter'; | ||
import { logout } from '@/infra/firebase/auth'; | ||
|
||
export const SignOutPage: FC = () => { | ||
useEffect(() => { | ||
logout(); | ||
const timer = setTimeout(() => { | ||
Router.push('/'); | ||
}, 10000); | ||
return () => clearTimeout(timer); | ||
}, []); | ||
return <SignOut />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import Image from 'next/image'; | ||
import type { FC } from 'react'; | ||
import { Button } from '@/presentation/primitive/component/button/button.presenter'; | ||
import { Link } from '@/presentation/primitive/component/link/link.presenter'; | ||
import { Separator } from '@/presentation/primitive/component/sepatator/separator.presenter'; | ||
|
||
// | ||
// TODO: http-errorとほぼ共通のUIを持つので、`priimtive/component`に共通部分を移動する | ||
// | ||
|
||
export const SignOut: FC = () => ( | ||
<div className="flex flex-col items-center justify-start gap-6 p-4 pt-0 lg:flex-row lg:justify-center lg:gap-12"> | ||
{/* グラデーションをよりきれいなものにするために、`primary-100`とほぼ同等だけれど、より若干明るく鮮やかな色を指定する! */} | ||
<div className="fixed top-0 -z-10 flex h-80 w-full origin-top flex-col items-center justify-center bg-gradient-to-b from-[#FEECFE] to-secondary-100/0" /> | ||
<figure className="grid max-w-md flex-none select-none grid-cols-1 grid-rows-1"> | ||
<div className="relative col-span-full row-span-full"> | ||
<Image src="/heroes/concept.png" className="select-none" width={1176} height={1342} alt="OZ at 3Iのロゴ画像" /> | ||
</div> | ||
<div className="col-span-full row-span-full flex items-center justify-center"> | ||
<div className="relative z-10 bg-gradient-to-br from-primary-400/75 to-secondary-400/75 p-6 text-center font-pixel-latin text-white backdrop-blur-md"> | ||
May We | ||
<br /> | ||
Meet Again! | ||
</div> | ||
</div> | ||
</figure> | ||
<div className="hidden h-60 items-center justify-center lg:flex"> | ||
<Separator orientation="vertical" /> | ||
</div> | ||
<div className="flex flex-col items-center justify-start gap-6 p-0"> | ||
<div className="text-center font-pixel-latin shadow-neutral-900 drop-shadow-lg "> | ||
<div className="bg-gradient-to-br bg-clip-text p-0 text-5xl text-transparent gradient-primary"> | ||
<h1>SIGNOUT</h1> | ||
</div> | ||
<p>THANK YOU FOR PLAYING!</p> | ||
</div> | ||
<span>OZで遊んでくれてありがとう!またお会いしましょう。</span> | ||
<span className="text-xs text-neutral-500">数秒後に自動でトップページにリダイレクトされます</span> | ||
<Link href="/" className="drop-shadow-none hover:no-underline"> | ||
<Button outlined>トップページへ戻る</Button> | ||
</Link> | ||
</div> | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import type { ComponentStoryObj, ComponentMeta } from '@storybook/react'; | ||
|
||
import { SignOut } from './sign-out.presenter'; | ||
|
||
type Story = ComponentStoryObj<typeof SignOut>; | ||
|
||
const meta: ComponentMeta<typeof SignOut> = { | ||
component: SignOut, | ||
parameters: { | ||
layout: 'fullscreen', | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Default: Story = {}; |
e5d38fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
shikosai32 – ./
3i-shikosai32.vercel.app
shikosai32-3-i-shikosai32.vercel.app
shikosai32-git-main-3-i-shikosai32.vercel.app
3i.shikosai.net