Skip to content

Commit

Permalink
updates texts of password change form for signup process
Browse files Browse the repository at this point in the history
  • Loading branch information
agnlez committed Jan 29, 2025
1 parent 59370e5 commit d79e80c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions client/src/containers/auth/change-password/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import Input from 'components/forms/input/component';

import authenticationService from 'services/authentication';

const ChangePassword: FC<{ token: string | undefined }> = ({ token }) => {
const ChangePassword: FC<{ token: string | undefined; isSignUp?: boolean | undefined }> = ({
token,
isSignUp,
}) => {
const router = useRouter();

const handleFormSubmit = useCallback(
Expand Down Expand Up @@ -53,7 +56,9 @@ const ChangePassword: FC<{ token: string | undefined }> = ({ token }) => {
>
{({ submitError, handleSubmit }) => (
<form className="space-y-5" onSubmit={handleSubmit} autoComplete="off">
<h2 className="text-3xl text-center font-normal">Change password</h2>
<h2 className="text-3xl text-center font-normal">
{isSignUp ? 'Create password' : 'Change password'}
</h2>
<div>
<label>New password</label>
<FieldRFF name="password" type="password">
Expand All @@ -72,7 +77,7 @@ const ChangePassword: FC<{ token: string | undefined }> = ({ token }) => {
Cancel
</LinkButton>
<Button theme="green" size="base" className="flex-1" type="submit">
<span>Reset password</span>
<span>{isSignUp ? 'Create password' : 'Reset password'}</span>
</Button>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/auth/signup/[token]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { withAuth } from 'hoc/auth';
const SignupPage = () => {
const params = useParams<{ token: string } | null>();

return <ChangePassword token={params?.token} />;
return <ChangePassword token={params?.token} isSignUp />;
};

export const getServerSideProps = withAuth();
Expand Down

0 comments on commit d79e80c

Please sign in to comment.