-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa99ad1
commit d06f55d
Showing
6 changed files
with
45 additions
and
2 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
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
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,39 @@ | ||
import { observer } from 'mobx-react-lite'; | ||
import React, { useEffect } from 'react'; | ||
import { useForm } from 'react-hook-form'; | ||
import { useHistory, generatePath } from 'react-router-dom'; | ||
|
||
import { BodyScreen, Header, PageBody, PageFooter, PageStoreHOC, NavButton } from '@/components'; | ||
import { PAGE_URL } from '@/configs/path'; | ||
|
||
const UseTermsPage: React.FC = observer(() => { | ||
const { | ||
replace, | ||
push, | ||
location: { pathname }, | ||
} = useHistory(); | ||
const { handleSubmit, formState } = useForm<User.FindPasswordReqestDto>(); | ||
const { isSubmitting } = formState; | ||
|
||
const onSubmit = async () => { | ||
if (pathname === PAGE_URL.SignUp) replace(PAGE_URL.SignIn); | ||
else push(generatePath(pathname)); | ||
}; | ||
|
||
return ( | ||
<> | ||
<Header title="이용 약관" /> | ||
<PageBody> | ||
<BodyScreen>어쩌고 저쩌고</BodyScreen> | ||
</PageBody> | ||
|
||
<PageFooter> | ||
<NavButton disabled={isSubmitting} onClick={handleSubmit(onSubmit)}> | ||
위 약관을 모두 확인했습니다. | ||
</NavButton> | ||
</PageFooter> | ||
</> | ||
); | ||
}); | ||
|
||
export default PageStoreHOC(<UseTermsPage />); |
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 @@ | ||
export { default as UseTerms } from './UseTermsPage'; |