From f41555b4982ea9468279bea69e385013f47fc639 Mon Sep 17 00:00:00 2001 From: Krsiak Daniel Date: Wed, 18 Dec 2024 13:43:27 +0100 Subject: [PATCH] =?UTF-8?q?refactor(structure)!:=20=F0=9F=91=B7=20componen?= =?UTF-8?q?t=20files=20and=20folders=20(#197)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor(structure)!: 👷 component files and folders * fix(import): 🐛 failed build on inccorect path --- __tests__/playwright/about-me/aboutMe.spec.ts | 2 +- .../header/desktop-menu/linkAboutMe.spec.ts | 2 +- .../desktop-menu/linkPersonalProjects.spec.ts | 2 +- .../header/desktop-menu/linkResume.spec.ts | 2 +- .../desktop-menu/linkWorkExperience.spec.ts | 2 +- .../playwright/homepage/heroTexts.spec.ts | 2 +- app/about-me/page.tsx | 2 +- app/error.tsx | 2 +- app/global-error.tsx | 2 +- app/layout.tsx | 4 +- app/page.tsx | 10 ++-- app/personal-projects/cryptomania/page.tsx | 2 +- app/personal-projects/krsiak/page.tsx | 2 +- app/personal-projects/page.tsx | 4 +- app/resume/page.tsx | 4 +- app/status-page/page.tsx | 2 +- app/work-experience/groupon/page.tsx | 2 +- app/work-experience/komercni-banka/page.tsx | 2 +- app/work-experience/kooperativa/page.tsx | 2 +- app/work-experience/moravia/page.tsx | 2 +- app/work-experience/page.tsx | 4 +- .../smartsupp-dashboard/page.tsx | 2 +- app/work-experience/smartsupp-help/page.tsx | 2 +- app/work-experience/smartsupp-web/page.tsx | 2 +- components/Footer.tsx | 55 ------------------- components/aboutMe/HeadingInfo.tsx | 2 +- components/aboutMe/Photo.tsx | 2 +- components/footer/Footer.tsx | 19 +++++++ components/footer/FooterLeft.tsx | 22 ++++++++ components/footer/FooterRight.tsx | 23 ++++++++ components/header/Header.tsx | 4 +- components/header/Logo.tsx | 2 +- components/header/{ => menu}/Menu.tsx | 2 +- components/header/{ => menu}/MenuDesktop.tsx | 0 components/header/{ => menu}/MenuMobile.tsx | 0 components/header/{ => menu}/MenuToggle.tsx | 0 .../homepage/{ => expertise}/MyMindset.tsx | 10 ++-- .../MySKills.tsx} | 6 +- components/homepage/{ => hero}/Hero.tsx | 0 .../homepage/{ => hero}/HeroHeading.tsx | 2 +- components/homepage/{ => hero}/HeroLink.tsx | 0 .../homepage/{ => hero}/HeroMainLinks.tsx | 2 +- .../homepage/{ => hero}/HeroParagraph.tsx | 2 +- components/homepage/{ => skills}/Skills.tsx | 2 +- .../{ => skills}/SkillsForCompany.tsx | 2 +- .../homepage/{ => skills}/SkillsIconGroup.tsx | 0 .../homepage/{ => skills}/SkillsMain.tsx | 0 components/layout/ErrorPageLayout.tsx | 2 +- components/layout/projectPage/Gallery.tsx | 33 +++++++++++ .../layout/projectPage/HeaderSection.tsx | 2 +- .../layout/projectPage/ProjectPageLayout.tsx | 52 +++++------------- .../projectPage/ProjectResponsibility.tsx | 23 ++++++++ .../{ => overviewPage}/ProjectItem.tsx | 1 + .../{ => overviewPage}/ProjectSection.tsx | 2 +- .../GitHubRepositoryLink.tsx | 0 .../ProjectInformation.tsx | 2 +- .../ProjectLinksList.tsx | 0 .../{ => projectDetailPage}/SkillsList.tsx | 8 +-- components/resume/ResumeInfo.tsx | 2 +- .../mindsetInfo.ts => expertise/mindset.ts} | 2 +- data/{whatido => expertise}/skillsInfo.ts | 0 data/menu/desktopLinks.ts | 2 +- data/menu/mobileLinks.ts | 2 +- localization/{texts_en.ts => english.ts} | 0 utils/helpers/generateIconsSkills.ts | 5 ++ .../{shared => interfaces}/componentProps.ts | 0 66 files changed, 204 insertions(+), 155 deletions(-) delete mode 100644 components/Footer.tsx create mode 100644 components/footer/Footer.tsx create mode 100644 components/footer/FooterLeft.tsx create mode 100644 components/footer/FooterRight.tsx rename components/header/{ => menu}/Menu.tsx (97%) rename components/header/{ => menu}/MenuDesktop.tsx (100%) rename components/header/{ => menu}/MenuMobile.tsx (100%) rename components/header/{ => menu}/MenuToggle.tsx (100%) rename components/homepage/{ => expertise}/MyMindset.tsx (55%) rename components/homepage/{WhatIDoMindset.tsx => expertise/MySKills.tsx} (74%) rename components/homepage/{ => hero}/Hero.tsx (100%) rename components/homepage/{ => hero}/HeroHeading.tsx (89%) rename components/homepage/{ => hero}/HeroLink.tsx (100%) rename components/homepage/{ => hero}/HeroMainLinks.tsx (95%) rename components/homepage/{ => hero}/HeroParagraph.tsx (87%) rename components/homepage/{ => skills}/Skills.tsx (92%) rename components/homepage/{ => skills}/SkillsForCompany.tsx (91%) rename components/homepage/{ => skills}/SkillsIconGroup.tsx (100%) rename components/homepage/{ => skills}/SkillsMain.tsx (100%) create mode 100644 components/layout/projectPage/Gallery.tsx create mode 100644 components/layout/projectPage/ProjectResponsibility.tsx rename components/projects/{ => overviewPage}/ProjectItem.tsx (97%) rename components/projects/{ => overviewPage}/ProjectSection.tsx (92%) rename components/projects/{ => projectDetailPage}/GitHubRepositoryLink.tsx (100%) rename components/projects/{ => projectDetailPage}/ProjectInformation.tsx (96%) rename components/projects/{ => projectDetailPage}/ProjectLinksList.tsx (100%) rename components/projects/{ => projectDetailPage}/SkillsList.tsx (83%) rename data/{whatido/mindsetInfo.ts => expertise/mindset.ts} (95%) rename data/{whatido => expertise}/skillsInfo.ts (100%) rename localization/{texts_en.ts => english.ts} (100%) rename utils/{shared => interfaces}/componentProps.ts (100%) diff --git a/__tests__/playwright/about-me/aboutMe.spec.ts b/__tests__/playwright/about-me/aboutMe.spec.ts index 679f0ce9..cc9e58c1 100644 --- a/__tests__/playwright/about-me/aboutMe.spec.ts +++ b/__tests__/playwright/about-me/aboutMe.spec.ts @@ -1,5 +1,5 @@ import { getDataTestId } from '@/__tests__/playwright/utils/helpers/getDataTestId' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' import { expect, test } from '@playwright/test' diff --git a/__tests__/playwright/header/desktop-menu/linkAboutMe.spec.ts b/__tests__/playwright/header/desktop-menu/linkAboutMe.spec.ts index eee4c0ac..aa24e6d3 100644 --- a/__tests__/playwright/header/desktop-menu/linkAboutMe.spec.ts +++ b/__tests__/playwright/header/desktop-menu/linkAboutMe.spec.ts @@ -1,5 +1,5 @@ import { getDataTestId } from '@/__tests__/playwright/utils/helpers/getDataTestId' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' import { expect, test } from '@playwright/test' diff --git a/__tests__/playwright/header/desktop-menu/linkPersonalProjects.spec.ts b/__tests__/playwright/header/desktop-menu/linkPersonalProjects.spec.ts index 7e2cf774..5dfbd1f6 100644 --- a/__tests__/playwright/header/desktop-menu/linkPersonalProjects.spec.ts +++ b/__tests__/playwright/header/desktop-menu/linkPersonalProjects.spec.ts @@ -1,5 +1,5 @@ import { getDataTestId } from '@/__tests__/playwright/utils/helpers/getDataTestId' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' import { expect, test } from '@playwright/test' diff --git a/__tests__/playwright/header/desktop-menu/linkResume.spec.ts b/__tests__/playwright/header/desktop-menu/linkResume.spec.ts index eaee011b..33bbc754 100644 --- a/__tests__/playwright/header/desktop-menu/linkResume.spec.ts +++ b/__tests__/playwright/header/desktop-menu/linkResume.spec.ts @@ -1,5 +1,5 @@ import { getDataTestId } from '@/__tests__/playwright/utils/helpers/getDataTestId' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' import { expect, test } from '@playwright/test' diff --git a/__tests__/playwright/header/desktop-menu/linkWorkExperience.spec.ts b/__tests__/playwright/header/desktop-menu/linkWorkExperience.spec.ts index b2cd51c4..3da0dff2 100644 --- a/__tests__/playwright/header/desktop-menu/linkWorkExperience.spec.ts +++ b/__tests__/playwright/header/desktop-menu/linkWorkExperience.spec.ts @@ -1,5 +1,5 @@ import { getDataTestId } from '@/__tests__/playwright/utils/helpers/getDataTestId' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' import { expect, test } from '@playwright/test' diff --git a/__tests__/playwright/homepage/heroTexts.spec.ts b/__tests__/playwright/homepage/heroTexts.spec.ts index bfda4ddd..d4920169 100644 --- a/__tests__/playwright/homepage/heroTexts.spec.ts +++ b/__tests__/playwright/homepage/heroTexts.spec.ts @@ -1,5 +1,5 @@ import { getDataTestId } from '@/__tests__/playwright/utils/helpers/getDataTestId' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { Browser, BrowserContext, Page, chromium, expect, test } from '@playwright/test' diff --git a/app/about-me/page.tsx b/app/about-me/page.tsx index 1e7a91d9..a0e6e706 100644 --- a/app/about-me/page.tsx +++ b/app/about-me/page.tsx @@ -4,7 +4,7 @@ import Photo from '@/components/aboutMe/Photo' import PageContainer from '@/components/layout/PageContainer' import PageNavigation from '@/components/pageNavigation/PageNavigation' import BreadCrumbs from '@/components/shared/Breadcrumbs' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' diff --git a/app/error.tsx b/app/error.tsx index d16c3d8d..cd747555 100644 --- a/app/error.tsx +++ b/app/error.tsx @@ -2,7 +2,7 @@ import { ErrorPageLayout } from '@/components/layout/ErrorPageLayout' import { ID } from '@/utils/constants/ids/elementIds' -import { ErrorProps } from '@/utils/shared/componentProps' +import { ErrorProps } from '@/utils/interfaces/componentProps' export default function Error({ error, reset }: ErrorProps) { return ( diff --git a/app/global-error.tsx b/app/global-error.tsx index 20f57afa..19bb10f9 100644 --- a/app/global-error.tsx +++ b/app/global-error.tsx @@ -2,7 +2,7 @@ import { ErrorPageLayout } from '@/components/layout/ErrorPageLayout' import { ID } from '@/utils/constants/ids/elementIds' -import { ErrorProps } from '@/utils/shared/componentProps' +import { ErrorProps } from '@/utils/interfaces/componentProps' export default function GlobalError({ error, reset }: ErrorProps) { return ( diff --git a/app/layout.tsx b/app/layout.tsx index 625805ec..6b37137d 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,6 +1,6 @@ -import Footer from '@/components/Footer' +import Footer from '@/components/footer/Footer' import Header from '@/components/header/Header' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import type { Metadata } from 'next' import { Inter } from 'next/font/google' import './globals.css' diff --git a/app/page.tsx b/app/page.tsx index 416a23c1..c6009b92 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,10 +1,10 @@ -import Hero from '@/components/homepage/Hero' -import Skills from '@/components/homepage/Skills' -import SkillsMain from '@/components/homepage/SkillsMain' -import WhatIDoMindset from '@/components/homepage/WhatIDoMindset' +import WhatIDoMindset from '@/components/homepage/expertise/MySKills' +import Hero from '@/components/homepage/hero/Hero' +import Skills from '@/components/homepage/skills/Skills' +import SkillsMain from '@/components/homepage/skills/SkillsMain' import PageContainer from '@/components/layout/PageContainer' import PageNavigation from '@/components/pageNavigation/PageNavigation' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' diff --git a/app/personal-projects/cryptomania/page.tsx b/app/personal-projects/cryptomania/page.tsx index 1d13fd0c..d5f37c5d 100644 --- a/app/personal-projects/cryptomania/page.tsx +++ b/app/personal-projects/cryptomania/page.tsx @@ -2,7 +2,7 @@ import ProjectPageLayout from '@/components/layout/projectPage/ProjectPageLayout import PageNavigation from '@/components/pageNavigation/PageNavigation' import { sections } from '@/data/projects/personal/cryptoMania' import { projectsPersonalReact } from '@/data/projects/personal/projectsOverview/personalReact' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL, URL_PERSONAL_PROJECTS } from '@/utils/constants/urls/pageUrls' diff --git a/app/personal-projects/krsiak/page.tsx b/app/personal-projects/krsiak/page.tsx index e12f2bca..65d507aa 100644 --- a/app/personal-projects/krsiak/page.tsx +++ b/app/personal-projects/krsiak/page.tsx @@ -2,7 +2,7 @@ import ProjectPageLayout from '@/components/layout/projectPage/ProjectPageLayout import PageNavigation from '@/components/pageNavigation/PageNavigation' import { sections } from '@/data/projects/personal/krsiak' import { projectsPersonalNext } from '@/data/projects/personal/projectsOverview/personalNext' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL, URL_PERSONAL_PROJECTS } from '@/utils/constants/urls/pageUrls' diff --git a/app/personal-projects/page.tsx b/app/personal-projects/page.tsx index 4dfa39ee..d362be66 100644 --- a/app/personal-projects/page.tsx +++ b/app/personal-projects/page.tsx @@ -1,10 +1,10 @@ import PageContainer from '@/components/layout/PageContainer' import ProjectsLayout from '@/components/layout/ProjectsLayout' import PageNavigation from '@/components/pageNavigation/PageNavigation' -import { ProjectSection } from '@/components/projects/ProjectSection' +import { ProjectSection } from '@/components/projects/overviewPage/ProjectSection' import BreadCrumbs from '@/components/shared/Breadcrumbs' import { projectsPersonalNext, projectsPersonalReact } from '@/data/projects/personal/projectsOverview' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' diff --git a/app/resume/page.tsx b/app/resume/page.tsx index 71ef0624..68218636 100644 --- a/app/resume/page.tsx +++ b/app/resume/page.tsx @@ -1,9 +1,9 @@ -import HeroLink from '@/components/homepage/HeroLink' +import HeroLink from '@/components/homepage/hero/HeroLink' import PageContainer from '@/components/layout/PageContainer' import PageNavigation from '@/components/pageNavigation/PageNavigation' import ResumeInfo from '@/components/resume/ResumeInfo' import BreadCrumbs from '@/components/shared/Breadcrumbs' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { EXTERNAL_URL } from '@/utils/constants/urls/externalUrls' diff --git a/app/status-page/page.tsx b/app/status-page/page.tsx index a59c0421..d086380e 100644 --- a/app/status-page/page.tsx +++ b/app/status-page/page.tsx @@ -1,7 +1,7 @@ import PageContainer from '@/components/layout/PageContainer' import Heading1 from '@/components/shared/Heading1' import { statusBadges } from '@/data/statusPage' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { Metadata } from 'next' import Image from 'next/image' diff --git a/app/work-experience/groupon/page.tsx b/app/work-experience/groupon/page.tsx index 6d90acc2..bfcd8e5c 100644 --- a/app/work-experience/groupon/page.tsx +++ b/app/work-experience/groupon/page.tsx @@ -2,7 +2,7 @@ import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/Projec import PageNavigation from '@/components/pageNavigation/PageNavigation' import { sections } from '@/data/projects/work/groupon' import { projectsWorkQA } from '@/data/projects/work/projectsOverview/workQA' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants/urls/pageUrls' diff --git a/app/work-experience/komercni-banka/page.tsx b/app/work-experience/komercni-banka/page.tsx index 6ac91306..0ef8f0fc 100644 --- a/app/work-experience/komercni-banka/page.tsx +++ b/app/work-experience/komercni-banka/page.tsx @@ -2,7 +2,7 @@ import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/Projec import PageNavigation from '@/components/pageNavigation/PageNavigation' import { sections } from '@/data/projects/work/komercniBanka' import { projectsWorkReact } from '@/data/projects/work/projectsOverview/workReact' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants/urls/pageUrls' diff --git a/app/work-experience/kooperativa/page.tsx b/app/work-experience/kooperativa/page.tsx index b32499aa..593df9e8 100644 --- a/app/work-experience/kooperativa/page.tsx +++ b/app/work-experience/kooperativa/page.tsx @@ -2,7 +2,7 @@ import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/Projec import PageNavigation from '@/components/pageNavigation/PageNavigation' import { sections } from '@/data/projects/work/kooperativa' import { projectsWorkReact } from '@/data/projects/work/projectsOverview/workReact' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants/urls/pageUrls' diff --git a/app/work-experience/moravia/page.tsx b/app/work-experience/moravia/page.tsx index 80f255e8..3ad5e9f8 100644 --- a/app/work-experience/moravia/page.tsx +++ b/app/work-experience/moravia/page.tsx @@ -2,7 +2,7 @@ import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/Projec import PageNavigation from '@/components/pageNavigation/PageNavigation' import { sections } from '@/data/projects/work/moravia' import { projectsWorkLocalization } from '@/data/projects/work/projectsOverview/workLocalization' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants/urls/pageUrls' diff --git a/app/work-experience/page.tsx b/app/work-experience/page.tsx index d022df87..ec302fb6 100644 --- a/app/work-experience/page.tsx +++ b/app/work-experience/page.tsx @@ -1,9 +1,9 @@ import PageContainer from '@/components/layout/PageContainer' import ProjectsLayout from '@/components/layout/ProjectsLayout' import PageNavigation from '@/components/pageNavigation/PageNavigation' -import { ProjectSection } from '@/components/projects/ProjectSection' import ExperienceCard from '@/components/projects/experience/ExperienceCard' import ExperienceOtherTitle from '@/components/projects/experience/ExperienceOtherTitle' +import { ProjectSection } from '@/components/projects/overviewPage/ProjectSection' import BreadCrumbs from '@/components/shared/Breadcrumbs' import { projectsWorkFrontEnd, @@ -12,7 +12,7 @@ import { projectsWorkReact, projectsWorkWordPress, } from '@/data/projects/work/projectsOverview' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' diff --git a/app/work-experience/smartsupp-dashboard/page.tsx b/app/work-experience/smartsupp-dashboard/page.tsx index d4d759e0..93443e14 100644 --- a/app/work-experience/smartsupp-dashboard/page.tsx +++ b/app/work-experience/smartsupp-dashboard/page.tsx @@ -2,7 +2,7 @@ import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/Projec import PageNavigation from '@/components/pageNavigation/PageNavigation' import { projectsWorkReact } from '@/data/projects/work/projectsOverview/workReact' import { sections } from '@/data/projects/work/smartsuppDashboard' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants/urls/pageUrls' diff --git a/app/work-experience/smartsupp-help/page.tsx b/app/work-experience/smartsupp-help/page.tsx index 34d6e32f..2356a37c 100644 --- a/app/work-experience/smartsupp-help/page.tsx +++ b/app/work-experience/smartsupp-help/page.tsx @@ -2,7 +2,7 @@ import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/Projec import PageNavigation from '@/components/pageNavigation/PageNavigation' import { projectsWorkWordPress } from '@/data/projects/work/projectsOverview/workWordpress' import { sections } from '@/data/projects/work/smartsuppHelp' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants/urls/pageUrls' diff --git a/app/work-experience/smartsupp-web/page.tsx b/app/work-experience/smartsupp-web/page.tsx index ac60d823..4640e86e 100644 --- a/app/work-experience/smartsupp-web/page.tsx +++ b/app/work-experience/smartsupp-web/page.tsx @@ -2,7 +2,7 @@ import { ProjectPageLayoutWrapper } from '@/components/layout/projectPage/Projec import PageNavigation from '@/components/pageNavigation/PageNavigation' import { projectsWorkFrontEnd } from '@/data/projects/work/projectsOverview/workFrontEnd' import { sections } from '@/data/projects/work/smartsuppWeb' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL, URL_WORK_EXPERIENCE } from '@/utils/constants/urls/pageUrls' diff --git a/components/Footer.tsx b/components/Footer.tsx deleted file mode 100644 index 9c74b621..00000000 --- a/components/Footer.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import ScrollToTopButton from '@/components/footer/ScrollToTopButton' -import PageContainer from '@/components/layout/PageContainer' -import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' -import { ID } from '@/utils/constants/ids/elementIds' -import { getCurrentYear } from '@/utils/helpers/getCurrentYear' -import Link from 'next/link' - -const FooterLeft = () => { - return ( -
- 😼 😺 - - Copyright © {getCurrentYear()} - - | - - - krsiak.cz - - -
- ) -} - -const FooterRight = () => { - return ( -
-
- - Status page - - 🟢 -
- -
- ) -} - -const Footer = () => { - return ( - -
-
- - -
-
-
- ) -} -export default Footer diff --git a/components/aboutMe/HeadingInfo.tsx b/components/aboutMe/HeadingInfo.tsx index 9f650ab0..a95f356c 100644 --- a/components/aboutMe/HeadingInfo.tsx +++ b/components/aboutMe/HeadingInfo.tsx @@ -1,6 +1,6 @@ import Heading1 from '@/components/shared/Heading1' import HighlightedText from '@/components/shared/HighlightedText' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' const HeadingInfo = () => { diff --git a/components/aboutMe/Photo.tsx b/components/aboutMe/Photo.tsx index bd9060a6..5001872b 100644 --- a/components/aboutMe/Photo.tsx +++ b/components/aboutMe/Photo.tsx @@ -1,4 +1,4 @@ -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import krsiak from '@/public/images/webp/krsiak-daniel-400.webp' import Image from 'next/image' diff --git a/components/footer/Footer.tsx b/components/footer/Footer.tsx new file mode 100644 index 00000000..ab516bc1 --- /dev/null +++ b/components/footer/Footer.tsx @@ -0,0 +1,19 @@ +import PageContainer from '@/components/layout/PageContainer' +import { ID } from '@/utils/constants/ids/elementIds' +import FooterLeft from './FooterLeft' +import FooterRight from './FooterRight' + +const Footer = () => { + return ( + +
+
+ + +
+
+
+ ) +} + +export default Footer diff --git a/components/footer/FooterLeft.tsx b/components/footer/FooterLeft.tsx new file mode 100644 index 00000000..a49709e3 --- /dev/null +++ b/components/footer/FooterLeft.tsx @@ -0,0 +1,22 @@ +import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' +import { getCurrentYear } from '@/utils/helpers/getCurrentYear' +import Link from 'next/link' + +export const FooterLeft = () => { + return ( +
+ 😼 😺 + + Copyright © {getCurrentYear()} + + | + + + krsiak.cz + + +
+ ) +} + +export default FooterLeft diff --git a/components/footer/FooterRight.tsx b/components/footer/FooterRight.tsx new file mode 100644 index 00000000..2a758999 --- /dev/null +++ b/components/footer/FooterRight.tsx @@ -0,0 +1,23 @@ +import ScrollToTopButton from '@/components/footer/ScrollToTopButton' +import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' +import Link from 'next/link' + +const FooterRight = () => { + return ( +
+
+ + Status page + + 🟢 +
+ +
+ ) +} + +export default FooterRight diff --git a/components/header/Header.tsx b/components/header/Header.tsx index 55359b42..3dbefcc6 100644 --- a/components/header/Header.tsx +++ b/components/header/Header.tsx @@ -1,8 +1,8 @@ 'use client' // using hooks import Logo from '@/components/header/Logo' -import Menu from '@/components/header/Menu' -import MenuToggle from '@/components/header/MenuToggle' +import Menu from '@/components/header/menu/Menu' +import MenuToggle from '@/components/header/menu/MenuToggle' import ScrollProgressBar from '@/components/header/ScrollProgressBar' import { useScrollProgress } from '@/hooks/useScrollProgress' import { useState } from 'react' diff --git a/components/header/Logo.tsx b/components/header/Logo.tsx index b50108fb..e2f53b20 100644 --- a/components/header/Logo.tsx +++ b/components/header/Logo.tsx @@ -1,4 +1,4 @@ -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import logo from '@/public/images/webp/logo.webp' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' diff --git a/components/header/Menu.tsx b/components/header/menu/Menu.tsx similarity index 97% rename from components/header/Menu.tsx rename to components/header/menu/Menu.tsx index 7ebf27f2..d49e8670 100644 --- a/components/header/Menu.tsx +++ b/components/header/menu/Menu.tsx @@ -1,4 +1,4 @@ -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { ID } from '@/utils/constants/ids/elementIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' import Link from 'next/link' diff --git a/components/header/MenuDesktop.tsx b/components/header/menu/MenuDesktop.tsx similarity index 100% rename from components/header/MenuDesktop.tsx rename to components/header/menu/MenuDesktop.tsx diff --git a/components/header/MenuMobile.tsx b/components/header/menu/MenuMobile.tsx similarity index 100% rename from components/header/MenuMobile.tsx rename to components/header/menu/MenuMobile.tsx diff --git a/components/header/MenuToggle.tsx b/components/header/menu/MenuToggle.tsx similarity index 100% rename from components/header/MenuToggle.tsx rename to components/header/menu/MenuToggle.tsx diff --git a/components/homepage/MyMindset.tsx b/components/homepage/expertise/MyMindset.tsx similarity index 55% rename from components/homepage/MyMindset.tsx rename to components/homepage/expertise/MyMindset.tsx index 704ae94a..50eeee1d 100644 --- a/components/homepage/MyMindset.tsx +++ b/components/homepage/expertise/MyMindset.tsx @@ -1,18 +1,18 @@ import Heading2 from '@/components/shared/Heading2' -import { mindsetInfo } from '@/data/whatido/mindsetInfo' +import { mindset } from '@/data/expertise/mindset' const MyMindset = () => { return (
🥇🚀 I Have Committed Mindset - {mindsetInfo.map((mindset) => ( -
+ {mindset.map((skill) => ( +

- {mindset.id}. {mindset.title} + {skill.id}. {skill.title}

-

{mindset.description}

+

{skill.description}

))}
diff --git a/components/homepage/WhatIDoMindset.tsx b/components/homepage/expertise/MySKills.tsx similarity index 74% rename from components/homepage/WhatIDoMindset.tsx rename to components/homepage/expertise/MySKills.tsx index 1d2c80c1..c6e6a26f 100644 --- a/components/homepage/WhatIDoMindset.tsx +++ b/components/homepage/expertise/MySKills.tsx @@ -1,8 +1,8 @@ +import SkillsForCompany from '@/components/homepage/skills/SkillsForCompany' import DividerWithText from '@/components/shared/DividerWithText' import MyMindset from './MyMindset' -import SkillsForCompany from './SkillsForCompany' -const WhatIDoMindset = () => { +const MySKills = () => { return (
@@ -14,4 +14,4 @@ const WhatIDoMindset = () => { ) } -export default WhatIDoMindset +export default MySKills diff --git a/components/homepage/Hero.tsx b/components/homepage/hero/Hero.tsx similarity index 100% rename from components/homepage/Hero.tsx rename to components/homepage/hero/Hero.tsx diff --git a/components/homepage/HeroHeading.tsx b/components/homepage/hero/HeroHeading.tsx similarity index 89% rename from components/homepage/HeroHeading.tsx rename to components/homepage/hero/HeroHeading.tsx index 0d8fa0bd..1daf7862 100644 --- a/components/homepage/HeroHeading.tsx +++ b/components/homepage/hero/HeroHeading.tsx @@ -1,5 +1,5 @@ import Heading1 from '@/components/shared/Heading1' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' const HeroHeading = () => { return ( diff --git a/components/homepage/HeroLink.tsx b/components/homepage/hero/HeroLink.tsx similarity index 100% rename from components/homepage/HeroLink.tsx rename to components/homepage/hero/HeroLink.tsx diff --git a/components/homepage/HeroMainLinks.tsx b/components/homepage/hero/HeroMainLinks.tsx similarity index 95% rename from components/homepage/HeroMainLinks.tsx rename to components/homepage/hero/HeroMainLinks.tsx index 82a93f4c..ae482a9b 100644 --- a/components/homepage/HeroMainLinks.tsx +++ b/components/homepage/hero/HeroMainLinks.tsx @@ -1,4 +1,4 @@ -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { EXTERNAL_URL } from '@/utils/constants/urls/externalUrls' import HeroLink from './HeroLink' diff --git a/components/homepage/HeroParagraph.tsx b/components/homepage/hero/HeroParagraph.tsx similarity index 87% rename from components/homepage/HeroParagraph.tsx rename to components/homepage/hero/HeroParagraph.tsx index 01303ad8..5f671f2d 100644 --- a/components/homepage/HeroParagraph.tsx +++ b/components/homepage/hero/HeroParagraph.tsx @@ -1,4 +1,4 @@ -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' const HeroParagraph = () => { diff --git a/components/homepage/Skills.tsx b/components/homepage/skills/Skills.tsx similarity index 92% rename from components/homepage/Skills.tsx rename to components/homepage/skills/Skills.tsx index d207bbc1..30f07d84 100644 --- a/components/homepage/Skills.tsx +++ b/components/homepage/skills/Skills.tsx @@ -1,7 +1,7 @@ +import SkillsIconGroup from '@/components/homepage/skills/SkillsIconGroup' import DividerWithText from '@/components/shared/DividerWithText' import { iconsSkills1, iconsSkills2, iconsSkills3, iconsSkills4 } from '@/data/skills/skillsMain' import { ID } from '@/utils/constants/ids/elementIds' -import SkillsIconGroup from './SkillsIconGroup' const Skills = () => { return ( diff --git a/components/homepage/SkillsForCompany.tsx b/components/homepage/skills/SkillsForCompany.tsx similarity index 91% rename from components/homepage/SkillsForCompany.tsx rename to components/homepage/skills/SkillsForCompany.tsx index 0c317ee4..d79941b7 100644 --- a/components/homepage/SkillsForCompany.tsx +++ b/components/homepage/skills/SkillsForCompany.tsx @@ -1,5 +1,5 @@ import Heading2 from '@/components/shared/Heading2' -import { skillsInfo } from '@/data/whatido/skillsInfo' +import { skillsInfo } from '@/data/expertise/skillsInfo' const SkillsForCompany = () => { return ( diff --git a/components/homepage/SkillsIconGroup.tsx b/components/homepage/skills/SkillsIconGroup.tsx similarity index 100% rename from components/homepage/SkillsIconGroup.tsx rename to components/homepage/skills/SkillsIconGroup.tsx diff --git a/components/homepage/SkillsMain.tsx b/components/homepage/skills/SkillsMain.tsx similarity index 100% rename from components/homepage/SkillsMain.tsx rename to components/homepage/skills/SkillsMain.tsx diff --git a/components/layout/ErrorPageLayout.tsx b/components/layout/ErrorPageLayout.tsx index 00f601f3..f378a2d6 100644 --- a/components/layout/ErrorPageLayout.tsx +++ b/components/layout/ErrorPageLayout.tsx @@ -1,7 +1,7 @@ import PageContainer from '@/components/layout/PageContainer' import Heading1 from '@/components/shared/Heading1' import imgError from '@/public/images/webp/error.webp' -import { ErrorProps } from '@/utils/shared/componentProps' +import { ErrorProps } from '@/utils/interfaces/componentProps' import Image from 'next/image' import { useEffect } from 'react' diff --git a/components/layout/projectPage/Gallery.tsx b/components/layout/projectPage/Gallery.tsx new file mode 100644 index 00000000..e78347c7 --- /dev/null +++ b/components/layout/projectPage/Gallery.tsx @@ -0,0 +1,33 @@ +import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' +import { ImageShowcaseItem } from '@/utils/interfaces/interfaces' +import Image from 'next/image' + +interface GalleryProps { + imageShowcase: ImageShowcaseItem[] +} + +const Gallery = ({ imageShowcase }: GalleryProps) => { + return ( +
+

Gallery

+

See project screenshots below.

+
+ {imageShowcase.map((image) => ( +
+ {`project-image-${image.id}`} +
+ ))} +
+
+ ) +} + +export default Gallery diff --git a/components/layout/projectPage/HeaderSection.tsx b/components/layout/projectPage/HeaderSection.tsx index 77dcd567..d088b43f 100644 --- a/components/layout/projectPage/HeaderSection.tsx +++ b/components/layout/projectPage/HeaderSection.tsx @@ -2,7 +2,7 @@ import { IconArrow } from '@/components/icons' import Heading1 from '@/components/shared/Heading1' import Heading2 from '@/components/shared/Heading2' import { getGoBackLinkID } from '@/utils/helpers/getGoBackLink' -import { HeaderSectionProps } from '@/utils/shared/componentProps' +import { HeaderSectionProps } from '@/utils/interfaces/componentProps' import Link from 'next/link' const HeaderSection = ({ title, role, years, company, goBackLink, sectionID }: HeaderSectionProps) => { diff --git a/components/layout/projectPage/ProjectPageLayout.tsx b/components/layout/projectPage/ProjectPageLayout.tsx index 4cb311f3..340882c3 100644 --- a/components/layout/projectPage/ProjectPageLayout.tsx +++ b/components/layout/projectPage/ProjectPageLayout.tsx @@ -1,22 +1,27 @@ import PageContainer from '@/components/layout/PageContainer' import HeaderSection from '@/components/layout/projectPage/HeaderSection' -import PageSection from '@/components/layout/projectPage/PageSection' -import ProjectInformation from '@/components/projects/ProjectInformation' +import ProjectInformation from '@/components/projects/projectDetailPage/ProjectInformation' import BreadCrumbs from '@/components/shared/Breadcrumbs' -import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' +import { HeaderSectionProps } from '@/utils/interfaces/componentProps' import { ImageShowcaseItem, Project, Section } from '@/utils/interfaces/interfaces' import { BreadCrumbsType } from '@/utils/interfaces/types' -import { HeaderSectionProps } from '@/utils/shared/componentProps' -import Image from 'next/image' +import Gallery from './Gallery' +import ProjectResponsibility from './ProjectResponsibility' -type ProjectPageLayoutProps = { +type BreadCrumbsProps = { breadCrumbs: BreadCrumbsType +} + +type PageProps = { pageID: string sections: Section[] imageShowcase: ImageShowcaseItem[] PageNavigation: React.ReactNode -} & HeaderSectionProps & - Pick +} + +type ProjectProps = Pick + +type ProjectPageLayoutProps = BreadCrumbsProps & HeaderSectionProps & ProjectProps & PageProps const ProjectPageLayout = ({ breadCrumbs, @@ -60,37 +65,10 @@ const ProjectPageLayout = ({ linkGitHub={linkGitHub} /> -
- {sections.map((section) => ( - - ))} -
+ -
-

Gallery

-

See project screenshots below.

-
+ -
- {imageShowcase.map((image) => ( -
- {`project-image-${image.id}`} -
- ))} -
{PageNavigation} ) diff --git a/components/layout/projectPage/ProjectResponsibility.tsx b/components/layout/projectPage/ProjectResponsibility.tsx new file mode 100644 index 00000000..3fdbe26c --- /dev/null +++ b/components/layout/projectPage/ProjectResponsibility.tsx @@ -0,0 +1,23 @@ +import { Section } from '@/utils/interfaces/interfaces' +import PageSection from './PageSection' + +type ProjectResponsibilityProps = { + sections: Section[] +} + +const ProjectResponsibility = ({ sections }: ProjectResponsibilityProps) => { + return ( +
+ {sections.map((section) => ( + + ))} +
+ ) +} + +export default ProjectResponsibility diff --git a/components/projects/ProjectItem.tsx b/components/projects/overviewPage/ProjectItem.tsx similarity index 97% rename from components/projects/ProjectItem.tsx rename to components/projects/overviewPage/ProjectItem.tsx index 172fcde8..2f54bd42 100644 --- a/components/projects/ProjectItem.tsx +++ b/components/projects/overviewPage/ProjectItem.tsx @@ -18,6 +18,7 @@ type ProjectItemProps = { dataTestId: string } +// TODO: refactor into smaller components for better readability const ProjectItem = ({ isFeatured, image, diff --git a/components/projects/ProjectSection.tsx b/components/projects/overviewPage/ProjectSection.tsx similarity index 92% rename from components/projects/ProjectSection.tsx rename to components/projects/overviewPage/ProjectSection.tsx index cd920aff..2a30d1ba 100644 --- a/components/projects/ProjectSection.tsx +++ b/components/projects/overviewPage/ProjectSection.tsx @@ -1,5 +1,5 @@ -import ProjectItem from '@/components/projects/ProjectItem' import ExperienceSection from '@/components/projects/experience/ExperienceSection' +import ProjectItem from '@/components/projects/overviewPage/ProjectItem' import { Project } from '@/utils/interfaces/interfaces' type ProjectSectionProps = { diff --git a/components/projects/GitHubRepositoryLink.tsx b/components/projects/projectDetailPage/GitHubRepositoryLink.tsx similarity index 100% rename from components/projects/GitHubRepositoryLink.tsx rename to components/projects/projectDetailPage/GitHubRepositoryLink.tsx diff --git a/components/projects/ProjectInformation.tsx b/components/projects/projectDetailPage/ProjectInformation.tsx similarity index 96% rename from components/projects/ProjectInformation.tsx rename to components/projects/projectDetailPage/ProjectInformation.tsx index f8ef21e1..477e97f8 100644 --- a/components/projects/ProjectInformation.tsx +++ b/components/projects/projectDetailPage/ProjectInformation.tsx @@ -1,7 +1,7 @@ import List from '@/components/shared/List' import ListItem from '@/components/shared/ListItem' import { Project } from '@/utils/interfaces/interfaces' -import CustomersCount from './CustomersCount' +import CustomersCount from '../CustomersCount' import ProjectLinksList from './ProjectLinksList' import SkillsList from './SkillsList' diff --git a/components/projects/ProjectLinksList.tsx b/components/projects/projectDetailPage/ProjectLinksList.tsx similarity index 100% rename from components/projects/ProjectLinksList.tsx rename to components/projects/projectDetailPage/ProjectLinksList.tsx diff --git a/components/projects/SkillsList.tsx b/components/projects/projectDetailPage/SkillsList.tsx similarity index 83% rename from components/projects/SkillsList.tsx rename to components/projects/projectDetailPage/SkillsList.tsx index 6c68a8b7..50e22aa9 100644 --- a/components/projects/SkillsList.tsx +++ b/components/projects/projectDetailPage/SkillsList.tsx @@ -3,7 +3,9 @@ import List from '@/components/shared/List' import ListItem from '@/components/shared/ListItem' import { Project, Skill } from '@/utils/interfaces/interfaces' -const renderSkills = (skillCategoryObject: Skill) => { +type SkillsListProps = Pick + +const getSkillBadge = (skillCategoryObject: Skill) => { return skillCategoryObject.skillsList.map((skill: string) => ( { )) } -type SkillsListProps = Pick - const SkillsList = ({ skillsOverview }: SkillsListProps) => { return ( {skillsOverview.map((skillCategoryObject) => ( -
{renderSkills(skillCategoryObject)}
+
{getSkillBadge(skillCategoryObject)}
))}
diff --git a/components/resume/ResumeInfo.tsx b/components/resume/ResumeInfo.tsx index a4c21316..5a940bd9 100644 --- a/components/resume/ResumeInfo.tsx +++ b/components/resume/ResumeInfo.tsx @@ -1,6 +1,6 @@ import Heading1 from '@/components/shared/Heading1' import HighlightedText from '@/components/shared/HighlightedText' -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' const ResumeInfo = () => { diff --git a/data/whatido/mindsetInfo.ts b/data/expertise/mindset.ts similarity index 95% rename from data/whatido/mindsetInfo.ts rename to data/expertise/mindset.ts index 5be9d270..8c79f302 100644 --- a/data/whatido/mindsetInfo.ts +++ b/data/expertise/mindset.ts @@ -1,6 +1,6 @@ import { SkillInfo } from '@/utils/interfaces/interfaces' -export const mindsetInfo: SkillInfo[] = [ +export const mindset: SkillInfo[] = [ { id: 1, title: 'Continuous learning', diff --git a/data/whatido/skillsInfo.ts b/data/expertise/skillsInfo.ts similarity index 100% rename from data/whatido/skillsInfo.ts rename to data/expertise/skillsInfo.ts diff --git a/data/menu/desktopLinks.ts b/data/menu/desktopLinks.ts index f5fd5266..e38dcc5f 100644 --- a/data/menu/desktopLinks.ts +++ b/data/menu/desktopLinks.ts @@ -1,4 +1,4 @@ -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' import { MenuLink } from '@/utils/interfaces/interfaces' diff --git a/data/menu/mobileLinks.ts b/data/menu/mobileLinks.ts index 89057dec..5d108d7d 100644 --- a/data/menu/mobileLinks.ts +++ b/data/menu/mobileLinks.ts @@ -1,4 +1,4 @@ -import { TEXT } from '@/localization/texts_en' +import { TEXT } from '@/localization/english' import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' import { PAGES_URL } from '@/utils/constants/urls/pageUrls' import { MenuLink } from '@/utils/interfaces/interfaces' diff --git a/localization/texts_en.ts b/localization/english.ts similarity index 100% rename from localization/texts_en.ts rename to localization/english.ts diff --git a/utils/helpers/generateIconsSkills.ts b/utils/helpers/generateIconsSkills.ts index 0a62405c..55dd033b 100644 --- a/utils/helpers/generateIconsSkills.ts +++ b/utils/helpers/generateIconsSkills.ts @@ -1,3 +1,4 @@ +// Import SVG icons import chakra from '@/public/icons/svg/skills/chakra.svg' import css from '@/public/icons/svg/skills/css.svg' import cypress from '@/public/icons/svg/skills/cypress.svg' @@ -21,8 +22,10 @@ import ts from '@/public/icons/svg/skills/ts.svg' import wordpress from '@/public/icons/svg/skills/wordpress.svg' import xd from '@/public/icons/svg/skills/xd.svg' +// Import interfaces import { Icon } from '@/utils/interfaces/interfaces' +// Define skill keys type export type SkillKeys = | 'chakra' | 'css' @@ -47,6 +50,7 @@ export type SkillKeys = | 'wordpress' | 'xd' +// Map skill keys to their respective icons export const skillIcons: Record = { chakra, css, @@ -72,6 +76,7 @@ export const skillIcons: Record = { xd, } +// Generate icons for given skills export function generateIconsSkills(skills: SkillKeys[]): Icon[] { return skills.map((skill) => ({ name: skill, diff --git a/utils/shared/componentProps.ts b/utils/interfaces/componentProps.ts similarity index 100% rename from utils/shared/componentProps.ts rename to utils/interfaces/componentProps.ts