aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-09-19 18:13:57 +0200
committerArmand Philippot <git@armandphilippot.com>2023-09-19 19:12:31 +0200
commit2faf2e34331703b3bdea3eb487cb8799c8d65377 (patch)
treededc6557ddaa8fedd42d9bdf77950f8f9168ebcb /src/components/molecules/layout
parentd1fe9e2164fc5c8fd767b456eecc2a4eb929a33f (diff)
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.
Diffstat (limited to 'src/components/molecules/layout')
-rw-r--r--src/components/molecules/layout/branding.module.scss4
-rw-r--r--src/components/molecules/layout/branding.test.tsx2
-rw-r--r--src/components/molecules/layout/branding.tsx4
-rw-r--r--src/components/molecules/layout/card.module.scss2
-rw-r--r--src/components/molecules/layout/card.test.tsx2
-rw-r--r--src/components/molecules/layout/card.tsx6
-rw-r--r--src/components/molecules/layout/code.module.scss4
-rw-r--r--src/components/molecules/layout/code.test.tsx2
-rw-r--r--src/components/molecules/layout/code.tsx4
-rw-r--r--src/components/molecules/layout/columns.module.scss2
-rw-r--r--src/components/molecules/layout/columns.stories.tsx2
-rw-r--r--src/components/molecules/layout/columns.test.tsx4
-rw-r--r--src/components/molecules/layout/columns.tsx2
-rw-r--r--src/components/molecules/layout/meta.module.scss2
-rw-r--r--src/components/molecules/layout/meta.stories.tsx4
-rw-r--r--src/components/molecules/layout/meta.test.tsx4
-rw-r--r--src/components/molecules/layout/meta.tsx13
-rw-r--r--src/components/molecules/layout/page-footer.test.tsx2
-rw-r--r--src/components/molecules/layout/page-header.module.scss4
-rw-r--r--src/components/molecules/layout/page-header.test.tsx2
-rw-r--r--src/components/molecules/layout/page-header.tsx2
-rw-r--r--src/components/molecules/layout/widget.module.scss4
-rw-r--r--src/components/molecules/layout/widget.test.tsx2
23 files changed, 40 insertions, 39 deletions
diff --git a/src/components/molecules/layout/branding.module.scss b/src/components/molecules/layout/branding.module.scss
index 6121fa1..4d9e32c 100644
--- a/src/components/molecules/layout/branding.module.scss
+++ b/src/components/molecules/layout/branding.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;
@mixin typing-animation {
--typing-animation: none;
diff --git a/src/components/molecules/layout/branding.test.tsx b/src/components/molecules/layout/branding.test.tsx
index f04b963..b3dfaa9 100644
--- a/src/components/molecules/layout/branding.test.tsx
+++ b/src/components/molecules/layout/branding.test.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@tests/utils';
+import { render, screen } from '../../../../tests/utils';
import Branding from './branding';
describe('Branding', () => {
diff --git a/src/components/molecules/layout/branding.tsx b/src/components/molecules/layout/branding.tsx
index b351f12..10574ab 100644
--- a/src/components/molecules/layout/branding.tsx
+++ b/src/components/molecules/layout/branding.tsx
@@ -1,8 +1,8 @@
-import Heading from '@components/atoms/headings/heading';
-import useStyles from '@utils/hooks/use-styles';
import Link from 'next/link';
import { FC, useRef } from 'react';
import { useIntl } from 'react-intl';
+import useStyles from '../../../utils/hooks/use-styles';
+import Heading from '../../atoms/headings/heading';
import FlippingLogo, { type FlippingLogoProps } from '../images/flipping-logo';
import styles from './branding.module.scss';
diff --git a/src/components/molecules/layout/card.module.scss b/src/components/molecules/layout/card.module.scss
index 42e9192..8f9f4a5 100644
--- a/src/components/molecules/layout/card.module.scss
+++ b/src/components/molecules/layout/card.module.scss
@@ -1,4 +1,4 @@
-@use "@styles/abstracts/functions" as fun;
+@use "../../../styles/abstracts/functions" as fun;
.wrapper {
--scale-up: 1.05;
diff --git a/src/components/molecules/layout/card.test.tsx b/src/components/molecules/layout/card.test.tsx
index 1023aeb..825ad41 100644
--- a/src/components/molecules/layout/card.test.tsx
+++ b/src/components/molecules/layout/card.test.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@tests/utils';
+import { render, screen } from '../../../../tests/utils';
import Card from './card';
import { cover, id, meta, tagline, title, url } from './card.fixture';
diff --git a/src/components/molecules/layout/card.tsx b/src/components/molecules/layout/card.tsx
index d03b8b7..50431d8 100644
--- a/src/components/molecules/layout/card.tsx
+++ b/src/components/molecules/layout/card.tsx
@@ -1,7 +1,7 @@
-import ButtonLink from '@components/atoms/buttons/button-link';
-import Heading, { type HeadingLevel } from '@components/atoms/headings/heading';
-import { type Image } from '@ts/types/app';
import { FC } from 'react';
+import { type Image } from '../../../types/app';
+import ButtonLink from '../../atoms/buttons/button-link';
+import Heading, { type HeadingLevel } from '../../atoms/headings/heading';
import ResponsiveImage from '../images/responsive-image';
import styles from './card.module.scss';
import Meta, { type MetaData } from './meta';
diff --git a/src/components/molecules/layout/code.module.scss b/src/components/molecules/layout/code.module.scss
index 1feeccc..2eaf9a2 100644
--- a/src/components/molecules/layout/code.module.scss
+++ b/src/components/molecules/layout/code.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 {
:global {
diff --git a/src/components/molecules/layout/code.test.tsx b/src/components/molecules/layout/code.test.tsx
index e270aac..b825fec 100644
--- a/src/components/molecules/layout/code.test.tsx
+++ b/src/components/molecules/layout/code.test.tsx
@@ -1,4 +1,4 @@
-import { render } from '@tests/utils';
+import { render } from '../../../../tests/utils';
import Code from './code';
const code = `
diff --git a/src/components/molecules/layout/code.tsx b/src/components/molecules/layout/code.tsx
index 7e249d1..4eb9be3 100644
--- a/src/components/molecules/layout/code.tsx
+++ b/src/components/molecules/layout/code.tsx
@@ -1,8 +1,8 @@
+import { FC, useRef } from 'react';
import usePrism, {
type OptionalPrismPlugin,
type PrismLanguage,
-} from '@utils/hooks/use-prism';
-import { FC, useRef } from 'react';
+} from '../../../utils/hooks/use-prism';
import styles from './code.module.scss';
export type CodeProps = {
diff --git a/src/components/molecules/layout/columns.module.scss b/src/components/molecules/layout/columns.module.scss
index b449c45..0d383e7 100644
--- a/src/components/molecules/layout/columns.module.scss
+++ b/src/components/molecules/layout/columns.module.scss
@@ -1,4 +1,4 @@
-@use "@styles/abstracts/mixins" as mix;
+@use "../../../styles/abstracts/mixins" as mix;
.wrapper {
display: grid;
diff --git a/src/components/molecules/layout/columns.stories.tsx b/src/components/molecules/layout/columns.stories.tsx
index 2022fa4..7105bb9 100644
--- a/src/components/molecules/layout/columns.stories.tsx
+++ b/src/components/molecules/layout/columns.stories.tsx
@@ -1,5 +1,5 @@
-import Column from '@components/atoms/layout/column';
import { ComponentMeta, ComponentStory } from '@storybook/react';
+import Column from '../../atoms/layout/column';
import Columns from './columns';
export default {
diff --git a/src/components/molecules/layout/columns.test.tsx b/src/components/molecules/layout/columns.test.tsx
index 9e994ae..5a23d0d 100644
--- a/src/components/molecules/layout/columns.test.tsx
+++ b/src/components/molecules/layout/columns.test.tsx
@@ -1,5 +1,5 @@
-import Column from '@components/atoms/layout/column';
-import { render, screen } from '@tests/utils';
+import { render, screen } from '../../../../tests/utils';
+import Column from '../../atoms/layout/column';
import Columns from './columns';
const column1 =
diff --git a/src/components/molecules/layout/columns.tsx b/src/components/molecules/layout/columns.tsx
index c196457..ec62b18 100644
--- a/src/components/molecules/layout/columns.tsx
+++ b/src/components/molecules/layout/columns.tsx
@@ -1,5 +1,5 @@
-import Column from '@components/atoms/layout/column';
import { FC, ReactComponentElement } from 'react';
+import Column from '../../atoms/layout/column';
import styles from './columns.module.scss';
export type ColumnsProps = {
diff --git a/src/components/molecules/layout/meta.module.scss b/src/components/molecules/layout/meta.module.scss
index 4194a6e..f572b65 100644
--- a/src/components/molecules/layout/meta.module.scss
+++ b/src/components/molecules/layout/meta.module.scss
@@ -1,5 +1,3 @@
-@use "@styles/abstracts/mixins" as mix;
-
.value {
word-break: break-all;
}
diff --git a/src/components/molecules/layout/meta.stories.tsx b/src/components/molecules/layout/meta.stories.tsx
index c33680f..3a204c0 100644
--- a/src/components/molecules/layout/meta.stories.tsx
+++ b/src/components/molecules/layout/meta.stories.tsx
@@ -1,6 +1,6 @@
-import descriptionListItemStories from '@components/atoms/lists/description-list-item.stories';
-import descriptionListStories from '@components/atoms/lists/description-list.stories';
import { ComponentMeta, ComponentStory } from '@storybook/react';
+import descriptionListItemStories from '../../atoms/lists/description-list-item.stories';
+import descriptionListStories from '../../atoms/lists/description-list.stories';
import MetaComponent, { MetaData } from './meta';
/**
diff --git a/src/components/molecules/layout/meta.test.tsx b/src/components/molecules/layout/meta.test.tsx
index e01a0a1..e9deb23 100644
--- a/src/components/molecules/layout/meta.test.tsx
+++ b/src/components/molecules/layout/meta.test.tsx
@@ -1,5 +1,5 @@
-import { render, screen } from '@tests/utils';
-import { getFormattedDate } from '@utils/helpers/dates';
+import { render, screen } from '../../../../tests/utils';
+import { getFormattedDate } from '../../../utils/helpers/dates';
import Meta from './meta';
const data = {
diff --git a/src/components/molecules/layout/meta.tsx b/src/components/molecules/layout/meta.tsx
index 74bd4ff..48c0748 100644
--- a/src/components/molecules/layout/meta.tsx
+++ b/src/components/molecules/layout/meta.tsx
@@ -1,11 +1,14 @@
-import Link from '@components/atoms/links/link';
+import { FC, ReactNode } from 'react';
+import { useIntl } from 'react-intl';
+import {
+ getFormattedDate,
+ getFormattedTime,
+} from '../../../utils/helpers/dates';
+import Link from '../../atoms/links/link';
import DescriptionList, {
type DescriptionListProps,
type DescriptionListItem,
-} from '@components/atoms/lists/description-list';
-import { getFormattedDate, getFormattedTime } from '@utils/helpers/dates';
-import { FC, ReactNode } from 'react';
-import { useIntl } from 'react-intl';
+} from '../../atoms/lists/description-list';
export type CustomMeta = {
label: string;
diff --git a/src/components/molecules/layout/page-footer.test.tsx b/src/components/molecules/layout/page-footer.test.tsx
index f61cf20..baf13b2 100644
--- a/src/components/molecules/layout/page-footer.test.tsx
+++ b/src/components/molecules/layout/page-footer.test.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@tests/utils';
+import { render, screen } from '../../../../tests/utils';
import PageFooter from './page-footer';
describe('PageFooter', () => {
diff --git a/src/components/molecules/layout/page-header.module.scss b/src/components/molecules/layout/page-header.module.scss
index 232023a..1a90fe5 100644
--- a/src/components/molecules/layout/page-header.module.scss
+++ b/src/components/molecules/layout/page-header.module.scss
@@ -1,5 +1,5 @@
-@use "@styles/abstracts/functions" as fun;
-@use "@styles/abstracts/placeholders";
+@use "../../../styles/abstracts/functions" as fun;
+@use "../../../styles/abstracts/placeholders";
.wrapper {
@extend %grid;
diff --git a/src/components/molecules/layout/page-header.test.tsx b/src/components/molecules/layout/page-header.test.tsx
index 8e97669..9c737c7 100644
--- a/src/components/molecules/layout/page-header.test.tsx
+++ b/src/components/molecules/layout/page-header.test.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@tests/utils';
+import { render, screen } from '../../../../tests/utils';
import PageHeader from './page-header';
const title = 'Non nemo amet';
diff --git a/src/components/molecules/layout/page-header.tsx b/src/components/molecules/layout/page-header.tsx
index 6759c7f..78d875e 100644
--- a/src/components/molecules/layout/page-header.tsx
+++ b/src/components/molecules/layout/page-header.tsx
@@ -1,5 +1,5 @@
-import Heading from '@components/atoms/headings/heading';
import { FC, ReactNode } from 'react';
+import Heading from '../../atoms/headings/heading';
import Meta, { type MetaData } from './meta';
import styles from './page-header.module.scss';
diff --git a/src/components/molecules/layout/widget.module.scss b/src/components/molecules/layout/widget.module.scss
index 27d7ffd..1a601e5 100644
--- a/src/components/molecules/layout/widget.module.scss
+++ b/src/components/molecules/layout/widget.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;
.widget {
display: flex;
diff --git a/src/components/molecules/layout/widget.test.tsx b/src/components/molecules/layout/widget.test.tsx
index 5b6af57..47282a0 100644
--- a/src/components/molecules/layout/widget.test.tsx
+++ b/src/components/molecules/layout/widget.test.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@tests/utils';
+import { render, screen } from '../../../../tests/utils';
import Widget from './widget';
const children = 'Widget body';