Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/entities/agreements.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/feature/auth/presenter/authFormPresentation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Agreement } from '@/entities/agreements';
import type {
Input,
InputForForm,
Expand Down Expand Up @@ -49,7 +48,6 @@ type AuthFormPresentation = {
newPasswordConfirm: Input<string>;
code: Input<string>;
emailVerifySuccessCode: Input<string>;
agreements: Input<Agreement[]>;
};
formStates: {
mail: InputForForm<string>;
Expand All @@ -58,7 +56,6 @@ type AuthFormPresentation = {
newPassword: Input<string>;
code: InputForForm<string>;
emailVerifySuccessCode: InputForForm<string>;
agreements: InputForForm<Agreement[]>;
};
};
};
Expand All @@ -81,7 +78,6 @@ export const authFormPresentation: AuthFormPresentation = {
newPasswordConfirm,
code,
emailVerifySuccessCode,
agreements,
} = authInputPresentation.useValidator({
initialState: initialStateForInput,
});
Expand All @@ -96,7 +92,6 @@ export const authFormPresentation: AuthFormPresentation = {
newPasswordConfirm,
code,
emailVerifySuccessCode,
agreements,
},
formStates: {
mail,
Expand All @@ -111,12 +106,6 @@ export const authFormPresentation: AuthFormPresentation = {
...emailVerifySuccessCode,
isError: emailVerifySuccessCode.value.length === 0,
},
agreements: {
...agreements,
isError: agreements.value
.filter((agreement) => agreement.required)
.some((agreement) => !agreement.checked),
},
},
};
},
Expand Down
11 changes: 0 additions & 11 deletions src/feature/auth/presenter/authInputPresentation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { useState } from 'react';

import type { Agreement } from '@/entities/agreements';
import { TERMS } from '@/entities/agreements';
import type { Input, InputWithDetailedError } from '@/entities/input';

type InitialInputState = {
Expand Down Expand Up @@ -39,7 +37,6 @@ export type AuthInputPresentation = {
newPasswordConfirm: Input<string>;
code: Input<string>;
emailVerifySuccessCode: Input<string>;
agreements: Input<Agreement[]>;
};
};

Expand Down Expand Up @@ -74,9 +71,6 @@ export const authInputPresentation: AuthInputPresentation = {
initialState.code !== undefined ? initialState.code : ''
);
const [emailVerifySuccessCode, setEmailVerifySuccessCode] = useState('');
const [agreements, setAgreements] = useState(
TERMS.map((item) => ({ ...item, checked: false }))
);

return {
mail: {
Expand Down Expand Up @@ -137,11 +131,6 @@ export const authInputPresentation: AuthInputPresentation = {
value: emailVerifySuccessCode,
onChange: setEmailVerifySuccessCode,
},
agreements: {
isError: false,
value: agreements,
onChange: setAgreements,
},
};
},
};
Loading