feat: user profile/settings pages (#958)

This commit is contained in:
sct
2021-02-18 11:38:24 +09:00
committed by GitHub
parent 29b97ef6d8
commit bbb683e637
50 changed files with 2388 additions and 596 deletions

View File

@@ -7,6 +7,7 @@ import { Field, Form, Formik } from 'formik';
import * as Yup from 'yup';
import axios from 'axios';
import { useRouter } from 'next/router';
import Link from 'next/link';
const messages = defineMessages({
resetpassword: 'Reset Password',
@@ -76,13 +77,15 @@ const ResetPassword: React.FC = () => {
<div className="px-10 py-8">
{hasSubmitted ? (
<>
<p className="text-md text-gray-300">
<p className="text-gray-300 text-md">
{intl.formatMessage(messages.resetpasswordsuccessmessage)}
</p>
<span className="flex rounded-md shadow-sm justify-center mt-4">
<Button as="a" href="/login" buttonType="ghost">
{intl.formatMessage(messages.gobacklogin)}
</Button>
<span className="flex justify-center mt-4 rounded-md shadow-sm">
<Link href="/login" passHref>
<Button as="a" buttonType="ghost">
{intl.formatMessage(messages.gobacklogin)}
</Button>
</Link>
</span>
</>
) : (
@@ -124,7 +127,7 @@ const ResetPassword: React.FC = () => {
placeholder={intl.formatMessage(
messages.password
)}
className="text-white flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
className="flex-1 block w-full min-w-0 text-white transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
/>
</div>
{errors.password && touched.password && (
@@ -144,7 +147,7 @@ const ResetPassword: React.FC = () => {
name="confirmPassword"
placeholder="Confirm Password"
type="password"
className="text-white flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
className="flex-1 block w-full min-w-0 text-white transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
/>
</div>
{errors.confirmPassword &&