From 2faf2e34331703b3bdea3eb487cb8799c8d65377 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 19 Sep 2023 18:13:57 +0200 Subject: refactor(build): replace paths aliases with relative paths Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases. --- src/components/organisms/forms/comment-form.test.tsx | 2 +- src/components/organisms/forms/comment-form.tsx | 14 +++++++------- src/components/organisms/forms/contact-form.test.tsx | 2 +- src/components/organisms/forms/contact-form.tsx | 8 ++++---- src/components/organisms/forms/search-form.module.scss | 4 ++-- src/components/organisms/forms/search-form.test.tsx | 2 +- src/components/organisms/forms/search-form.tsx | 12 ++++++------ 7 files changed, 22 insertions(+), 22 deletions(-) (limited to 'src/components/organisms/forms') diff --git a/src/components/organisms/forms/comment-form.test.tsx b/src/components/organisms/forms/comment-form.test.tsx index cac9df7..10119ce 100644 --- a/src/components/organisms/forms/comment-form.test.tsx +++ b/src/components/organisms/forms/comment-form.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import CommentForm from './comment-form'; const saveComment = async () => { diff --git a/src/components/organisms/forms/comment-form.tsx b/src/components/organisms/forms/comment-form.tsx index b2c725f..a823977 100644 --- a/src/components/organisms/forms/comment-form.tsx +++ b/src/components/organisms/forms/comment-form.tsx @@ -1,13 +1,13 @@ -import Button from '@components/atoms/buttons/button'; -import Form, { type FormProps } from '@components/atoms/forms/form'; +import { FC, ReactNode, useState } from 'react'; +import { useIntl } from 'react-intl'; +import Button from '../../atoms/buttons/button'; +import Form, { type FormProps } from '../../atoms/forms/form'; import Heading, { type HeadingProps, type HeadingLevel, -} from '@components/atoms/headings/heading'; -import Spinner from '@components/atoms/loaders/spinner'; -import LabelledField from '@components/molecules/forms/labelled-field'; -import { FC, ReactNode, useState } from 'react'; -import { useIntl } from 'react-intl'; +} from '../../atoms/headings/heading'; +import Spinner from '../../atoms/loaders/spinner'; +import LabelledField from '../../molecules/forms/labelled-field'; import styles from './comment-form.module.scss'; export type CommentFormData = { diff --git a/src/components/organisms/forms/contact-form.test.tsx b/src/components/organisms/forms/contact-form.test.tsx index 521179a..def4346 100644 --- a/src/components/organisms/forms/contact-form.test.tsx +++ b/src/components/organisms/forms/contact-form.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import ContactForm from './contact-form'; const props = { diff --git a/src/components/organisms/forms/contact-form.tsx b/src/components/organisms/forms/contact-form.tsx index 912402c..b8dcb5e 100644 --- a/src/components/organisms/forms/contact-form.tsx +++ b/src/components/organisms/forms/contact-form.tsx @@ -1,9 +1,9 @@ -import Button from '@components/atoms/buttons/button'; -import Form from '@components/atoms/forms/form'; -import Spinner from '@components/atoms/loaders/spinner'; -import LabelledField from '@components/molecules/forms/labelled-field'; import { FC, ReactNode, useState } from 'react'; import { useIntl } from 'react-intl'; +import Button from '../../atoms/buttons/button'; +import Form from '../../atoms/forms/form'; +import Spinner from '../../atoms/loaders/spinner'; +import LabelledField from '../../molecules/forms/labelled-field'; import styles from './contact-form.module.scss'; export type ContactFormData = { diff --git a/src/components/organisms/forms/search-form.module.scss b/src/components/organisms/forms/search-form.module.scss index 1d388a4..773a79f 100644 --- a/src/components/organisms/forms/search-form.module.scss +++ b/src/components/organisms/forms/search-form.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/mixins" as mix; .wrapper { display: flex; diff --git a/src/components/organisms/forms/search-form.test.tsx b/src/components/organisms/forms/search-form.test.tsx index e35c46f..0f79caf 100644 --- a/src/components/organisms/forms/search-form.test.tsx +++ b/src/components/organisms/forms/search-form.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import SearchForm from './search-form'; describe('SearchForm', () => { diff --git a/src/components/organisms/forms/search-form.tsx b/src/components/organisms/forms/search-form.tsx index 1b5f662..a3cb6e4 100644 --- a/src/components/organisms/forms/search-form.tsx +++ b/src/components/organisms/forms/search-form.tsx @@ -1,12 +1,12 @@ -import Button from '@components/atoms/buttons/button'; -import Form from '@components/atoms/forms/form'; -import MagnifyingGlass from '@components/atoms/icons/magnifying-glass'; -import LabelledField, { - type LabelledFieldProps, -} from '@components/molecules/forms/labelled-field'; import { useRouter } from 'next/router'; import { forwardRef, ForwardRefRenderFunction, useId, useState } from 'react'; import { useIntl } from 'react-intl'; +import Button from '../../atoms/buttons/button'; +import Form from '../../atoms/forms/form'; +import MagnifyingGlass from '../../atoms/icons/magnifying-glass'; +import LabelledField, { + type LabelledFieldProps, +} from '../../molecules/forms/labelled-field'; import styles from './search-form.module.scss'; export type SearchFormProps = Pick & { -- cgit v1.2.3