From 94738f3766d02bbd209de6d44d47953553b7c2f3 Mon Sep 17 00:00:00 2001 From: HenriqueSSan Date: Sun, 1 Jan 2023 17:00:13 -0300 Subject: [PATCH 1/2] refactor(workspace): moved folders for src root --- src/App.tsx | 4 ++-- src/{template/Footer/components => modules/common}/Item.tsx | 0 src/{ => modules}/components/Accordion/@types/index.d.ts | 0 src/{ => modules}/components/Accordion/context/Items.tsx | 0 src/{ => modules}/components/Accordion/index.scss | 0 src/{ => modules}/components/Accordion/index.tsx | 0 src/{ => modules}/components/Breadcrumb/index.module.scss | 0 src/{ => modules}/components/Breadcrumb/index.tsx | 0 src/{settings => }/routes/index.module.scss | 0 src/{settings => }/routes/index.tsx | 0 src/{settings => }/styles/global/_config.scss | 0 src/{settings => }/styles/global/_reset.scss | 0 src/{settings => }/styles/global/exports.scss | 0 src/{settings => }/styles/index.scss | 0 src/{settings => }/styles/utils/exports.scss | 0 src/{settings => }/styles/utils/helpers/_functions.scss | 0 src/{settings => }/styles/utils/helpers/_mixin.scss | 0 src/{settings => }/styles/utils/resources/_colors.scss | 0 src/{settings => }/styles/utils/resources/_fonts.scss | 0 src/template/Footer/fragments/List.tsx | 2 +- src/template/Footer/fragments/Lists/Contact.tsx | 6 +++--- src/template/Footer/fragments/Lists/Institutional.tsx | 6 +++--- src/template/Footer/fragments/Lists/Question.tsx | 6 +++--- src/template/Footer/index.module.scss | 2 +- src/template/Header/index.module.scss | 2 +- 25 files changed, 14 insertions(+), 14 deletions(-) rename src/{template/Footer/components => modules/common}/Item.tsx (100%) rename src/{ => modules}/components/Accordion/@types/index.d.ts (100%) rename src/{ => modules}/components/Accordion/context/Items.tsx (100%) rename src/{ => modules}/components/Accordion/index.scss (100%) rename src/{ => modules}/components/Accordion/index.tsx (100%) rename src/{ => modules}/components/Breadcrumb/index.module.scss (100%) rename src/{ => modules}/components/Breadcrumb/index.tsx (100%) rename src/{settings => }/routes/index.module.scss (100%) rename src/{settings => }/routes/index.tsx (100%) rename src/{settings => }/styles/global/_config.scss (100%) rename src/{settings => }/styles/global/_reset.scss (100%) rename src/{settings => }/styles/global/exports.scss (100%) rename src/{settings => }/styles/index.scss (100%) rename src/{settings => }/styles/utils/exports.scss (100%) rename src/{settings => }/styles/utils/helpers/_functions.scss (100%) rename src/{settings => }/styles/utils/helpers/_mixin.scss (100%) rename src/{settings => }/styles/utils/resources/_colors.scss (100%) rename src/{settings => }/styles/utils/resources/_fonts.scss (100%) diff --git a/src/App.tsx b/src/App.tsx index 89df068..e7b7b49 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,7 @@ import { BrowserRouter } from 'react-router-dom' -import { Router } from './settings/routes' +import { Router } from './routes' -import './settings/styles/index.scss' +import './styles/index.scss' export function App() { return ( diff --git a/src/template/Footer/components/Item.tsx b/src/modules/common/Item.tsx similarity index 100% rename from src/template/Footer/components/Item.tsx rename to src/modules/common/Item.tsx diff --git a/src/components/Accordion/@types/index.d.ts b/src/modules/components/Accordion/@types/index.d.ts similarity index 100% rename from src/components/Accordion/@types/index.d.ts rename to src/modules/components/Accordion/@types/index.d.ts diff --git a/src/components/Accordion/context/Items.tsx b/src/modules/components/Accordion/context/Items.tsx similarity index 100% rename from src/components/Accordion/context/Items.tsx rename to src/modules/components/Accordion/context/Items.tsx diff --git a/src/components/Accordion/index.scss b/src/modules/components/Accordion/index.scss similarity index 100% rename from src/components/Accordion/index.scss rename to src/modules/components/Accordion/index.scss diff --git a/src/components/Accordion/index.tsx b/src/modules/components/Accordion/index.tsx similarity index 100% rename from src/components/Accordion/index.tsx rename to src/modules/components/Accordion/index.tsx diff --git a/src/components/Breadcrumb/index.module.scss b/src/modules/components/Breadcrumb/index.module.scss similarity index 100% rename from src/components/Breadcrumb/index.module.scss rename to src/modules/components/Breadcrumb/index.module.scss diff --git a/src/components/Breadcrumb/index.tsx b/src/modules/components/Breadcrumb/index.tsx similarity index 100% rename from src/components/Breadcrumb/index.tsx rename to src/modules/components/Breadcrumb/index.tsx diff --git a/src/settings/routes/index.module.scss b/src/routes/index.module.scss similarity index 100% rename from src/settings/routes/index.module.scss rename to src/routes/index.module.scss diff --git a/src/settings/routes/index.tsx b/src/routes/index.tsx similarity index 100% rename from src/settings/routes/index.tsx rename to src/routes/index.tsx diff --git a/src/settings/styles/global/_config.scss b/src/styles/global/_config.scss similarity index 100% rename from src/settings/styles/global/_config.scss rename to src/styles/global/_config.scss diff --git a/src/settings/styles/global/_reset.scss b/src/styles/global/_reset.scss similarity index 100% rename from src/settings/styles/global/_reset.scss rename to src/styles/global/_reset.scss diff --git a/src/settings/styles/global/exports.scss b/src/styles/global/exports.scss similarity index 100% rename from src/settings/styles/global/exports.scss rename to src/styles/global/exports.scss diff --git a/src/settings/styles/index.scss b/src/styles/index.scss similarity index 100% rename from src/settings/styles/index.scss rename to src/styles/index.scss diff --git a/src/settings/styles/utils/exports.scss b/src/styles/utils/exports.scss similarity index 100% rename from src/settings/styles/utils/exports.scss rename to src/styles/utils/exports.scss diff --git a/src/settings/styles/utils/helpers/_functions.scss b/src/styles/utils/helpers/_functions.scss similarity index 100% rename from src/settings/styles/utils/helpers/_functions.scss rename to src/styles/utils/helpers/_functions.scss diff --git a/src/settings/styles/utils/helpers/_mixin.scss b/src/styles/utils/helpers/_mixin.scss similarity index 100% rename from src/settings/styles/utils/helpers/_mixin.scss rename to src/styles/utils/helpers/_mixin.scss diff --git a/src/settings/styles/utils/resources/_colors.scss b/src/styles/utils/resources/_colors.scss similarity index 100% rename from src/settings/styles/utils/resources/_colors.scss rename to src/styles/utils/resources/_colors.scss diff --git a/src/settings/styles/utils/resources/_fonts.scss b/src/styles/utils/resources/_fonts.scss similarity index 100% rename from src/settings/styles/utils/resources/_fonts.scss rename to src/styles/utils/resources/_fonts.scss diff --git a/src/template/Footer/fragments/List.tsx b/src/template/Footer/fragments/List.tsx index 9c1d075..4b1b7cd 100644 --- a/src/template/Footer/fragments/List.tsx +++ b/src/template/Footer/fragments/List.tsx @@ -1,4 +1,4 @@ -import { AccordionProviderItems } from '../../../components/Accordion/context/Items' +import { AccordionProviderItems } from '../../../modules/components/Accordion/context/Items' import { ContactList } from './Lists/Contact' import { InstitutionalList } from './Lists/Institutional' import { QuestionsList } from './Lists/Question' diff --git a/src/template/Footer/fragments/Lists/Contact.tsx b/src/template/Footer/fragments/Lists/Contact.tsx index 6bd8f08..6a5271f 100644 --- a/src/template/Footer/fragments/Lists/Contact.tsx +++ b/src/template/Footer/fragments/Lists/Contact.tsx @@ -1,6 +1,6 @@ -import { Accordion } from '../../../../components/Accordion' -import { AccordionProps } from '../../../../components/Accordion/@types' -import { Item } from '../../components/Item' +import { Accordion } from '../../../../modules/components/Accordion' +import { AccordionProps } from '../../../../modules/components/Accordion/@types' +import { Item } from '../../../../modules/common/Item' import css from '../../index.module.scss' diff --git a/src/template/Footer/fragments/Lists/Institutional.tsx b/src/template/Footer/fragments/Lists/Institutional.tsx index ad3e131..a88dfcc 100644 --- a/src/template/Footer/fragments/Lists/Institutional.tsx +++ b/src/template/Footer/fragments/Lists/Institutional.tsx @@ -1,6 +1,6 @@ -import { Accordion } from '../../../../components/Accordion' -import { AccordionProps } from '../../../../components/Accordion/@types' -import { Item } from '../../components/Item' +import { Accordion } from '../../../../modules/components/Accordion' +import { AccordionProps } from '../../../../modules/components/Accordion/@types' +import { Item } from '../../../../modules/common/Item' import css from '../../index.module.scss' diff --git a/src/template/Footer/fragments/Lists/Question.tsx b/src/template/Footer/fragments/Lists/Question.tsx index 6c0c17e..b6396d5 100644 --- a/src/template/Footer/fragments/Lists/Question.tsx +++ b/src/template/Footer/fragments/Lists/Question.tsx @@ -1,6 +1,6 @@ -import { Accordion } from '../../../../components/Accordion' -import { AccordionProps } from '../../../../components/Accordion/@types' -import { Item } from '../../components/Item' +import { Accordion } from '../../../../modules/components/Accordion' +import { AccordionProps } from '../../../../modules/components/Accordion/@types' +import { Item } from '../../../../modules/common/Item' import css from '../../index.module.scss' diff --git a/src/template/Footer/index.module.scss b/src/template/Footer/index.module.scss index 3024c43..fb96ecb 100644 --- a/src/template/Footer/index.module.scss +++ b/src/template/Footer/index.module.scss @@ -1,4 +1,4 @@ -@use '../../settings/styles/utils/helpers/functions' as function; +@use '../../styles/utils/helpers/functions' as function; .footer { border-top: 1px solid var(--clr-common-black); diff --git a/src/template/Header/index.module.scss b/src/template/Header/index.module.scss index 9aac3c5..1cba6e8 100644 --- a/src/template/Header/index.module.scss +++ b/src/template/Header/index.module.scss @@ -1,4 +1,4 @@ -@use '../../settings/styles/utils/helpers/functions' as function; +@use '../../styles/utils/helpers/functions' as function; $containers: ( 'xs': 339px, From 928399fc81ef0a17ac38bd99006c168bcb8d9fc3 Mon Sep 17 00:00:00 2001 From: HenriqueSSan Date: Sun, 1 Jan 2023 17:05:23 -0300 Subject: [PATCH 2/2] fix(workspace): import not working --- src/modules/components/Breadcrumb/index.module.scss | 2 +- src/modules/components/Breadcrumb/index.tsx | 4 ++-- src/routes/index.module.scss | 2 +- src/routes/index.tsx | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/components/Breadcrumb/index.module.scss b/src/modules/components/Breadcrumb/index.module.scss index a6565ca..c8f34e0 100644 --- a/src/modules/components/Breadcrumb/index.module.scss +++ b/src/modules/components/Breadcrumb/index.module.scss @@ -1,4 +1,4 @@ -@use '../../settings/styles/utils/helpers/mixin' as mix; +@use '../../../styles/utils/helpers/mixin' as mix; .list { display: inline-flex; diff --git a/src/modules/components/Breadcrumb/index.tsx b/src/modules/components/Breadcrumb/index.tsx index de6db90..0e478da 100644 --- a/src/modules/components/Breadcrumb/index.tsx +++ b/src/modules/components/Breadcrumb/index.tsx @@ -1,5 +1,5 @@ -import arrowRightIcon from '../../assets/icons/arrow-right.svg' -import initialHomeIcon from '../../assets/icons/home.svg' +import arrowRightIcon from '../../../assets/icons/arrow-right.svg' +import initialHomeIcon from '../../../assets/icons/home.svg' import css from './index.module.scss' diff --git a/src/routes/index.module.scss b/src/routes/index.module.scss index 16b88fb..0202381 100644 --- a/src/routes/index.module.scss +++ b/src/routes/index.module.scss @@ -1,4 +1,4 @@ -@use '../../settings/styles/utils/helpers/functions' as function; +@use '../styles/utils/helpers/functions' as function; main :global { .main-container { diff --git a/src/routes/index.tsx b/src/routes/index.tsx index bdfc441..e73492d 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -1,11 +1,11 @@ import { useMemo } from 'react' import { Outlet, Route, Routes } from 'react-router-dom' -import { Breadcrumb } from '../../components/Breadcrumb' -import { About } from '../../pages/Institutional/About' -import { Contact } from '../../pages/Institutional/Contact' -import { Footer } from '../../template/Footer' -import { Header } from '../../template/Header' -import { Sidebar } from '../../template/Sidebar' +import { Breadcrumb } from '../modules/components/Breadcrumb' +import { About } from '../pages/Institutional/About' +import { Contact } from '../pages/Institutional/Contact' +import { Footer } from '../template/Footer' +import { Header } from '../template/Header' +import { Sidebar } from '../template/Sidebar' import css from './index.module.scss'