diff --git a/backend/package.json b/backend/package.json index 084b4118d..62c259d96 100644 --- a/backend/package.json +++ b/backend/package.json @@ -8,7 +8,9 @@ "scripts": { "lint:type": "npx tsc --noEmit", "lint:js": "npx eslint \"src/**/*.ts\"", + "lint:js:fix": "npx eslint --fix \"src/**/*.ts\"", "lint": "npm run lint:type && npm run lint:js", + "lint:fix": "npm run lint:type && npm run lint:js:fix", "start:dev": "nodemon --exec tsx src/index.ts", "migrate:dev": "node --loader ts-paths-esm-loader ../node_modules/knex/bin/cli.js migrate:latest", "migrate:dev:make": "node --loader ts-paths-esm-loader ../node_modules/knex/bin/cli.js migrate:make -x ts", diff --git a/frontend/package.json b/frontend/package.json index 159e25561..4cbc00ae9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -36,12 +36,14 @@ "@fortawesome/free-solid-svg-icons": "6.6.0", "@fortawesome/react-fontawesome": "0.2.2", "@reduxjs/toolkit": "2.2.7", + "@remotion/player": "4.0.201", "formik": "2.4.6", "framer-motion": "11.3.24", "react": "18.3.1", "react-dom": "18.3.1", "react-redux": "9.1.2", "react-router-dom": "6.26.0", + "remotion": "4.0.201", "shared": "*", "zod-formik-adapter": "1.3.0" } diff --git a/frontend/src/bundles/auth/components/sign-up-form/constants/constants.ts b/frontend/src/bundles/auth/components/sign-up-form/constants/constants.ts index 219f8854a..bee02e2d4 100644 --- a/frontend/src/bundles/auth/components/sign-up-form/constants/constants.ts +++ b/frontend/src/bundles/auth/components/sign-up-form/constants/constants.ts @@ -1,8 +1,10 @@ import { type UserSignUpRequestDto } from '~/bundles/users/users.js'; const DEFAULT_SIGN_UP_PAYLOAD: UserSignUpRequestDto = { + name: '', email: '', password: '', + confirmPassword: '', }; export { DEFAULT_SIGN_UP_PAYLOAD }; diff --git a/frontend/src/bundles/auth/components/sign-up-form/sign-up-form.tsx b/frontend/src/bundles/auth/components/sign-up-form/sign-up-form.tsx index 82d4620d0..d0a791e17 100644 --- a/frontend/src/bundles/auth/components/sign-up-form/sign-up-form.tsx +++ b/frontend/src/bundles/auth/components/sign-up-form/sign-up-form.tsx @@ -1,17 +1,25 @@ +import { UserValidationMessage } from 'shared/src/bundles/users/users.js'; + import { Box, Button, FormProvider, - Heading, Input, + Link, VStack, } from '~/bundles/common/components/components.js'; -import { useAppForm } from '~/bundles/common/hooks/hooks.js'; +import { AppRoute, DataStatus } from '~/bundles/common/enums/enums.js'; +import { + useAppForm, + useAppSelector, + useMemo, +} from '~/bundles/common/hooks/hooks.js'; import { type UserSignUpRequestDto, userSignUpValidationSchema, } from '~/bundles/users/users.js'; +import { FormError, FormHeader, PasswordInput } from '../common/components.js'; import { DEFAULT_SIGN_UP_PAYLOAD } from './constants/constants.js'; type Properties = { @@ -19,34 +27,73 @@ type Properties = { }; const SignUpForm: React.FC = ({ onSubmit }) => { + const { dataStatus } = useAppSelector(({ auth }) => ({ + dataStatus: auth.dataStatus, + })); const form = useAppForm({ initialValues: DEFAULT_SIGN_UP_PAYLOAD, validationSchema: userSignUpValidationSchema, onSubmit, }); - const { handleSubmit } = form; + const { handleSubmit, errors, values } = form; + + const isEmpty = useMemo( + () => Object.values(values).some((value) => value.trim().length === 0), + [values], + ); return ( - - Sign Up - + + + Already registerd?{' '} + + Log In + + + } + />
+ - + + +