Skip to content

Commit

Permalink
OV-4: * use of prettier for code styles
Browse files Browse the repository at this point in the history
  • Loading branch information
lfelix3011 committed Aug 20, 2024
1 parent 5295a8d commit 71abbc5
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import {
VStack,
} from '~/bundles/common/components/components.js';
import { AppRoute, DataStatus } from '~/bundles/common/enums/enums.js';
import { useAppForm, useAppSelector, useMemo } from '~/bundles/common/hooks/hooks.js';
import {
useAppForm,
useAppSelector,
useMemo,
} from '~/bundles/common/hooks/hooks.js';
import {
type UserSignUpRequestDto,
userSignUpValidationSchema,
Expand Down Expand Up @@ -78,8 +82,10 @@ const SignUpForm: React.FC<Properties> = ({ onSubmit }) => {
hasError={Boolean(errors.confirmPassword)}
/>
<FormError
isVisible={ dataStatus === DataStatus.REJECTED }
message={ UserValidationMessage.USER_IS_NOT_AVAILABLE }
isVisible={dataStatus === DataStatus.REJECTED}
message={
UserValidationMessage.USER_IS_NOT_AVAILABLE
}
/>
<Button
type="submit"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/bundles/auth/pages/auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Auth: React.FC = () => {
[dispatch],
);

if(dataStatus === DataStatus.FULFILLED) {
if (dataStatus === DataStatus.FULFILLED) {
return <Navigate to={AppRoute.ROOT} replace />;
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/bundles/auth/store/slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { signUp } from './actions.js';

type State = {
dataStatus: ValueOf<typeof DataStatus>;
user: UserSignUpResponseDto | undefined | null;
user: UserSignUpResponseDto | undefined | null;
};

const initialState: State = {
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/bundles/common/components/link/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ type Properties = {
variant?: 'primary' | 'secondary';
};

const Link: React.FC<Properties> = ({ children, to, variant = 'primary' }) => (
<LibraryLink as={NavLink} to={to} variant={variant}>{children}</LibraryLink>
const Link: React.FC<Properties> = ({ children, to, variant = 'primary' }) => (
<LibraryLink as={NavLink} to={to} variant={variant}>
{children}
</LibraryLink>
);

export { Link };
4 changes: 1 addition & 3 deletions frontend/src/framework/config/base-config.package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class BaseConfig implements Config {
private get envSchema(): EnvironmentSchema {
return {
APP: {
ENVIRONMENT: import.meta.env[
'VITE_APP_NODE_ENV'
],
ENVIRONMENT: import.meta.env['VITE_APP_NODE_ENV'],
},
API: {
ORIGIN_URL: import.meta.env[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type AppEnvironment } from '~/bundles/common/enums/enums.js';
import { type ValueOf } from '~/bundles/common/types/types.js';
import { type ValueOf } from '~/bundles/common/types/types.js';

type EnvironmentSchema = {
APP: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type ContentType } from '~/bundles/common/enums/enums.js';
import { type ValueOf } from '~/bundles/common/types/types.js';
import { type ValueOf } from '~/bundles/common/types/types.js';
import { type HttpOptions } from '~/framework/http/http.js';

type HttpApiOptions = Omit<HttpOptions, 'headers' | 'payload'> & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const UserValidationMessage = {
EMAIL_INVALID: 'Please enter a valid email',
PASSWORD_LENGTH: 'Password must have from 6 to 12 characters',
PASS_DONT_MATCH: 'Passwords must be identical',
USER_IS_NOT_AVAILABLE: 'User with this email already exists. Log in if it is you',
USER_IS_NOT_AVAILABLE:
'User with this email already exists. Log in if it is you',
} as const;

export { UserValidationMessage };
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ type UserSignUpRequestValidationDto = {

const userSignUp = z
.object<UserSignUpRequestValidationDto>({
name: z
.string()
.trim(),
name: z.string().trim(),
email: z
.string()
.trim()
Expand Down

0 comments on commit 71abbc5

Please sign in to comment.