aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates
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/templates
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/templates')
-rw-r--r--src/components/templates/layout/layout.module.scss6
-rw-r--r--src/components/templates/layout/layout.test.tsx2
-rw-r--r--src/components/templates/layout/layout.tsx30
-rw-r--r--src/components/templates/page/page-layout.module.scss6
-rw-r--r--src/components/templates/page/page-layout.stories.tsx16
-rw-r--r--src/components/templates/page/page-layout.test.tsx4
-rw-r--r--src/components/templates/page/page-layout.tsx34
-rw-r--r--src/components/templates/sectioned/sectioned-layout.test.tsx2
-rw-r--r--src/components/templates/sectioned/sectioned-layout.tsx8
9 files changed, 54 insertions, 54 deletions
diff --git a/src/components/templates/layout/layout.module.scss b/src/components/templates/layout/layout.module.scss
index 1080732..5b89341 100644
--- a/src/components/templates/layout/layout.module.scss
+++ b/src/components/templates/layout/layout.module.scss
@@ -1,6 +1,6 @@
-@use "@styles/abstracts/functions" as fun;
-@use "@styles/abstracts/mixins" as mix;
-@use "@styles/abstracts/placeholders";
+@use "../../../styles/abstracts/functions" as fun;
+@use "../../../styles/abstracts/mixins" as mix;
+@use "../../../styles/abstracts/placeholders";
.header {
border-bottom: fun.convert-px(3) solid var(--color-border-light);
diff --git a/src/components/templates/layout/layout.test.tsx b/src/components/templates/layout/layout.test.tsx
index eab7a2a..6b3818e 100644
--- a/src/components/templates/layout/layout.test.tsx
+++ b/src/components/templates/layout/layout.test.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@tests/utils';
+import { render, screen } from '../../../../tests/utils';
import Layout from './layout';
const body =
diff --git a/src/components/templates/layout/layout.tsx b/src/components/templates/layout/layout.tsx
index 2a10a30..cf35b5c 100644
--- a/src/components/templates/layout/layout.tsx
+++ b/src/components/templates/layout/layout.tsx
@@ -1,22 +1,22 @@
-import ButtonLink from '@components/atoms/buttons/button-link';
-import Career from '@components/atoms/icons/career';
-import CCBySA from '@components/atoms/icons/cc-by-sa';
-import ComputerScreen from '@components/atoms/icons/computer-screen';
-import Envelop from '@components/atoms/icons/envelop';
-import Home from '@components/atoms/icons/home';
-import PostsStack from '@components/atoms/icons/posts-stack';
-import Main from '@components/atoms/layout/main';
-import NoScript from '@components/atoms/layout/no-script';
-import Footer, { type FooterProps } from '@components/organisms/layout/footer';
-import Header, { type HeaderProps } from '@components/organisms/layout/header';
-import { type NextPageWithLayoutOptions } from '@ts/types/app';
-import useRouteChange from '@utils/hooks/use-route-change';
-import useScrollPosition from '@utils/hooks/use-scroll-position';
-import useSettings from '@utils/hooks/use-settings';
import Script from 'next/script';
import { FC, ReactElement, ReactNode, useRef, useState } from 'react';
import { useIntl } from 'react-intl';
import { Person, SearchAction, WebSite, WithContext } from 'schema-dts';
+import { type NextPageWithLayoutOptions } from '../../../types/app';
+import useRouteChange from '../../../utils/hooks/use-route-change';
+import useScrollPosition from '../../../utils/hooks/use-scroll-position';
+import useSettings from '../../../utils/hooks/use-settings';
+import ButtonLink from '../../atoms/buttons/button-link';
+import Career from '../../atoms/icons/career';
+import CCBySA from '../../atoms/icons/cc-by-sa';
+import ComputerScreen from '../../atoms/icons/computer-screen';
+import Envelop from '../../atoms/icons/envelop';
+import Home from '../../atoms/icons/home';
+import PostsStack from '../../atoms/icons/posts-stack';
+import Main from '../../atoms/layout/main';
+import NoScript from '../../atoms/layout/no-script';
+import Footer, { type FooterProps } from '../../organisms/layout/footer';
+import Header, { type HeaderProps } from '../../organisms/layout/header';
import photo from '/public/armand-philippot.jpg';
import styles from './layout.module.scss';
diff --git a/src/components/templates/page/page-layout.module.scss b/src/components/templates/page/page-layout.module.scss
index c7674ae..d29df2c 100644
--- a/src/components/templates/page/page-layout.module.scss
+++ b/src/components/templates/page/page-layout.module.scss
@@ -1,6 +1,6 @@
-@use "@styles/abstracts/functions" as fun;
-@use "@styles/abstracts/mixins" as mix;
-@use "@styles/abstracts/placeholders";
+@use "../../../styles/abstracts/functions" as fun;
+@use "../../../styles/abstracts/mixins" as mix;
+@use "../../../styles/abstracts/placeholders";
.breadcrumb {
@extend %grid;
diff --git a/src/components/templates/page/page-layout.stories.tsx b/src/components/templates/page/page-layout.stories.tsx
index 06c6c24..5fc5063 100644
--- a/src/components/templates/page/page-layout.stories.tsx
+++ b/src/components/templates/page/page-layout.stories.tsx
@@ -1,12 +1,12 @@
-import ButtonLink from '@components/atoms/buttons/button-link';
-import Heading from '@components/atoms/headings/heading';
-import Link from '@components/atoms/links/link';
-import { comments } from '@components/organisms/layout/comments-list.fixture';
-import PostsList from '@components/organisms/layout/posts-list';
-import { posts } from '@components/organisms/layout/posts-list.fixture';
-import LinksListWidget from '@components/organisms/widgets/links-list-widget';
-import Sharing from '@components/organisms/widgets/sharing';
import { ComponentMeta, ComponentStory } from '@storybook/react';
+import ButtonLink from '../../atoms/buttons/button-link';
+import Heading from '../../atoms/headings/heading';
+import Link from '../../atoms/links/link';
+import { comments } from '../../organisms/layout/comments-list.fixture';
+import PostsList from '../../organisms/layout/posts-list';
+import { posts } from '../../organisms/layout/posts-list.fixture';
+import LinksListWidget from '../../organisms/widgets/links-list-widget';
+import Sharing from '../../organisms/widgets/sharing';
import { LayoutBase } from '../layout/layout.stories';
import PageLayoutComponent from './page-layout';
diff --git a/src/components/templates/page/page-layout.test.tsx b/src/components/templates/page/page-layout.test.tsx
index b5480d8..316ff58 100644
--- a/src/components/templates/page/page-layout.test.tsx
+++ b/src/components/templates/page/page-layout.test.tsx
@@ -1,6 +1,6 @@
-import { comments } from '@components/organisms/layout/comments-list.fixture';
-import { render, screen } from '@tests/utils';
import { BreadcrumbList } from 'schema-dts';
+import { render, screen } from '../../../../tests/utils';
+import { comments } from '../../organisms/layout/comments-list.fixture';
import PageLayout from './page-layout';
const title = 'Incidunt ad earum';
diff --git a/src/components/templates/page/page-layout.tsx b/src/components/templates/page/page-layout.tsx
index d53f53d..6792724 100644
--- a/src/components/templates/page/page-layout.tsx
+++ b/src/components/templates/page/page-layout.tsx
@@ -1,30 +1,30 @@
-import Heading from '@components/atoms/headings/heading';
-import Notice, { type NoticeKind } from '@components/atoms/layout/notice';
-import Sidebar from '@components/atoms/layout/sidebar';
-import { MetaData } from '@components/molecules/layout/meta';
+import Script from 'next/script';
+import { FC, HTMLAttributes, ReactNode, useRef, useState } from 'react';
+import { useIntl } from 'react-intl';
+import { BreadcrumbList } from 'schema-dts';
+import { sendComment } from '../../../services/graphql/comments';
+import { SendCommentInput } from '../../../types/graphql/mutations';
+import useIsMounted from '../../../utils/hooks/use-is-mounted';
+import Heading from '../../atoms/headings/heading';
+import Notice, { type NoticeKind } from '../../atoms/layout/notice';
+import Sidebar from '../../atoms/layout/sidebar';
+import { MetaData } from '../../molecules/layout/meta';
import PageFooter, {
type PageFooterProps,
-} from '@components/molecules/layout/page-footer';
+} from '../../molecules/layout/page-footer';
import PageHeader, {
type PageHeaderProps,
-} from '@components/molecules/layout/page-header';
+} from '../../molecules/layout/page-header';
import Breadcrumb, {
type BreadcrumbItem,
-} from '@components/molecules/nav/breadcrumb';
+} from '../../molecules/nav/breadcrumb';
import CommentForm, {
type CommentFormProps,
-} from '@components/organisms/forms/comment-form';
+} from '../../organisms/forms/comment-form';
import CommentsList, {
type CommentsListProps,
-} from '@components/organisms/layout/comments-list';
-import TableOfContents from '@components/organisms/widgets/table-of-contents';
-import { sendComment } from '@services/graphql/comments';
-import { SendCommentInput } from '@ts/types/graphql/mutations';
-import useIsMounted from '@utils/hooks/use-is-mounted';
-import Script from 'next/script';
-import { FC, HTMLAttributes, ReactNode, useRef, useState } from 'react';
-import { useIntl } from 'react-intl';
-import { BreadcrumbList } from 'schema-dts';
+} from '../../organisms/layout/comments-list';
+import TableOfContents from '../../organisms/widgets/table-of-contents';
import styles from './page-layout.module.scss';
export type PageLayoutProps = {
diff --git a/src/components/templates/sectioned/sectioned-layout.test.tsx b/src/components/templates/sectioned/sectioned-layout.test.tsx
index 73d7224..a7f19cc 100644
--- a/src/components/templates/sectioned/sectioned-layout.test.tsx
+++ b/src/components/templates/sectioned/sectioned-layout.test.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@tests/utils';
+import { render, screen } from '../../../../tests/utils';
import { BreadcrumbList } from 'schema-dts';
import SectionedLayout from './sectioned-layout';
diff --git a/src/components/templates/sectioned/sectioned-layout.tsx b/src/components/templates/sectioned/sectioned-layout.tsx
index f91c354..7fcad63 100644
--- a/src/components/templates/sectioned/sectioned-layout.tsx
+++ b/src/components/templates/sectioned/sectioned-layout.tsx
@@ -1,10 +1,10 @@
-import Section, {
- type SectionProps,
- type SectionVariant,
-} from '@components/atoms/layout/section';
import Script from 'next/script';
import { FC } from 'react';
import { BreadcrumbList } from 'schema-dts';
+import Section, {
+ type SectionProps,
+ type SectionVariant,
+} from '../../atoms/layout/section';
export type Section = Pick<SectionProps, 'content' | 'title'>;