Skip to content

Commit

Permalink
refactor(structure)!: πŸ‘· component files and folders (#197)
Browse files Browse the repository at this point in the history
* refactor(structure)!: πŸ‘· component files and folders

* fix(import): πŸ› failed build on inccorect path
  • Loading branch information
krsiakdaniel authored Dec 18, 2024
1 parent e0e5204 commit f41555b
Show file tree
Hide file tree
Showing 66 changed files with 204 additions and 155 deletions.
2 changes: 1 addition & 1 deletion __tests__/playwright/about-me/aboutMe.spec.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion __tests__/playwright/homepage/heroTexts.spec.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
2 changes: 1 addition & 1 deletion app/about-me/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
10 changes: 5 additions & 5 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/personal-projects/cryptomania/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/personal-projects/krsiak/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions app/personal-projects/page.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 2 additions & 2 deletions app/resume/page.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/status-page/page.tsx
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/groupon/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/komercni-banka/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/kooperativa/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/moravia/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions app/work-experience/page.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/smartsupp-dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/smartsupp-help/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/work-experience/smartsupp-web/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
55 changes: 0 additions & 55 deletions components/Footer.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion components/aboutMe/HeadingInfo.tsx
Original file line number Diff line number Diff line change
@@ -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 = () => {
Expand Down
2 changes: 1 addition & 1 deletion components/aboutMe/Photo.tsx
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
19 changes: 19 additions & 0 deletions components/footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<PageContainer id={ID.footer}>
<footer className="border-t border-dashed bg-white">
<div className="mx-auto flex w-full flex-col items-center justify-between py-4 text-center text-neutral-600 md:flex-row">
<FooterLeft />
<FooterRight />
</div>
</footer>
</PageContainer>
)
}

export default Footer
22 changes: 22 additions & 0 deletions components/footer/FooterLeft.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div>
<span>😼 😺</span>
<span className="ml-2" data-testid={DATA_TEST_IDS.footer.copyright}>
Copyright Β©&nbsp;{getCurrentYear()}
</span>
<span className="mx-2 hidden md:inline-flex">|</span>
<span className="mt-4 block md:mt-0 md:inline">
<Link href="/" className="text-violet-600 underline hover:no-underline" data-testid={DATA_TEST_IDS.footer.link}>
krsiak.cz
</Link>
</span>
</div>
)
}

export default FooterLeft
23 changes: 23 additions & 0 deletions components/footer/FooterRight.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="flex space-x-4">
<div className="mt-4 flex space-x-2 md:mt-0">
<Link
href="/status-page"
className="text-violet-600 underline hover:no-underline"
data-testid={DATA_TEST_IDS.footer.statusPage}
>
Status page
</Link>
<span className="hidden md:inline">🟒</span>
</div>
<ScrollToTopButton />
</div>
)
}

export default FooterRight
4 changes: 2 additions & 2 deletions components/header/Header.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion components/header/Logo.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f41555b

Please sign in to comment.