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/molecules/modals/modal.module.scss | 4 ++-- src/components/molecules/modals/modal.test.tsx | 2 +- src/components/molecules/modals/modal.tsx | 10 +++++----- src/components/molecules/modals/tooltip.module.scss | 2 +- src/components/molecules/modals/tooltip.test.tsx | 2 +- src/components/molecules/modals/tooltip.tsx | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/components/molecules/modals') diff --git a/src/components/molecules/modals/modal.module.scss b/src/components/molecules/modals/modal.module.scss index f57d33c..22ddb11 100644 --- a/src/components/molecules/modals/modal.module.scss +++ b/src/components/molecules/modals/modal.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 { padding: var(--spacing-md); diff --git a/src/components/molecules/modals/modal.test.tsx b/src/components/molecules/modals/modal.test.tsx index a913d42..9297662 100644 --- a/src/components/molecules/modals/modal.test.tsx +++ b/src/components/molecules/modals/modal.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Modal from './modal'; const title = 'A custom title'; diff --git a/src/components/molecules/modals/modal.tsx b/src/components/molecules/modals/modal.tsx index 58f5fa0..76dab55 100644 --- a/src/components/molecules/modals/modal.tsx +++ b/src/components/molecules/modals/modal.tsx @@ -1,8 +1,8 @@ -import Heading, { type HeadingProps } from '@components/atoms/headings/heading'; -import { type CogProps } from '@components/atoms/icons/cog'; -import { type MagnifyingGlassProps } from '@components/atoms/icons/magnifying-glass'; import dynamic from 'next/dynamic'; import { FC, ReactNode } from 'react'; +import Heading, { type HeadingProps } from '../../atoms/headings/heading'; +import { type CogProps } from '../../atoms/icons/cog'; +import { type MagnifyingGlassProps } from '../../atoms/icons/magnifying-glass'; import styles from './modal.module.scss'; export type Icons = 'cogs' | 'search'; @@ -30,11 +30,11 @@ export type ModalProps = { title?: string; }; -const CogIcon = dynamic(() => import('@components/atoms/icons/cog'), { +const CogIcon = dynamic(() => import('../../atoms/icons/cog'), { ssr: false, }); const SearchIcon = dynamic( - () => import('@components/atoms/icons/magnifying-glass'), + () => import('../../atoms/icons/magnifying-glass'), { ssr: false } ); diff --git a/src/components/molecules/modals/tooltip.module.scss b/src/components/molecules/modals/tooltip.module.scss index 94aa3dd..0a177e5 100644 --- a/src/components/molecules/modals/tooltip.module.scss +++ b/src/components/molecules/modals/tooltip.module.scss @@ -1,4 +1,4 @@ -@use "@styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/functions" as fun; .wrapper { --title-height: #{fun.convert-px(40)}; diff --git a/src/components/molecules/modals/tooltip.test.tsx b/src/components/molecules/modals/tooltip.test.tsx index 0af7299..6bca281 100644 --- a/src/components/molecules/modals/tooltip.test.tsx +++ b/src/components/molecules/modals/tooltip.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Tooltip from './tooltip'; import { content, icon, title } from './tooltip.fixture'; diff --git a/src/components/molecules/modals/tooltip.tsx b/src/components/molecules/modals/tooltip.tsx index 9801393..9beab86 100644 --- a/src/components/molecules/modals/tooltip.tsx +++ b/src/components/molecules/modals/tooltip.tsx @@ -1,5 +1,5 @@ -import List, { type ListItem } from '@components/atoms/lists/list'; import { forwardRef, ForwardRefRenderFunction, ReactNode } from 'react'; +import List, { type ListItem } from '../../atoms/lists/list'; import styles from './tooltip.module.scss'; export type TooltipProps = { -- cgit v1.2.3