diff --git a/data/projects/personal/cryptoMania.ts b/data/projects/personal/cryptoMania.ts
index 841af021..4c38a0b3 100644
--- a/data/projects/personal/cryptoMania.ts
+++ b/data/projects/personal/cryptoMania.ts
@@ -1,6 +1,6 @@
-import type { SectionItem } from '@/utils/types'
+import { Section } from '@/utils/interfaces'
-export const sections: SectionItem[] = [
+export const sections: Section[] = [
{
title: 'Description',
titleHighlight: '',
diff --git a/data/projects/personal/krsiak.ts b/data/projects/personal/krsiak.ts
index f72691a2..4a812e06 100644
--- a/data/projects/personal/krsiak.ts
+++ b/data/projects/personal/krsiak.ts
@@ -1,6 +1,6 @@
-import type { SectionItem } from '@/utils/types'
+import { Section } from '@/utils/interfaces'
-export const sections: SectionItem[] = [
+export const sections: Section[] = [
{
title: 'Description',
titleHighlight: '',
diff --git a/data/projects/personal/projectsOverview.ts b/data/projects/personal/projectsOverview.ts
index 7cb5952b..d5934830 100644
--- a/data/projects/personal/projectsOverview.ts
+++ b/data/projects/personal/projectsOverview.ts
@@ -2,7 +2,7 @@ import {
iconsSkillsProjectsPersonalCryptomania,
iconsSkillsProjectsPersonalKrsiak,
} from '@/data/skills/skills-projects-personal'
-import { Project } from '@/utils/types'
+import { Project } from '@/utils/interfaces'
// project images
import krsiak1 from '@/public/images/projects-personal/krsiak/krsiak-1-light.png'
diff --git a/data/projects/work/groupon.ts b/data/projects/work/groupon.ts
index 7c658900..345f4aed 100644
--- a/data/projects/work/groupon.ts
+++ b/data/projects/work/groupon.ts
@@ -1,6 +1,6 @@
-import type { SectionItem } from '@/utils/types'
+import { Section } from '@/utils/interfaces'
-export const sections: SectionItem[] = [
+export const sections: Section[] = [
{
title: 'My job',
titleHighlight: '',
diff --git a/data/projects/work/komercniBanka.ts b/data/projects/work/komercniBanka.ts
index c84aab0a..fb6c796f 100644
--- a/data/projects/work/komercniBanka.ts
+++ b/data/projects/work/komercniBanka.ts
@@ -1,6 +1,6 @@
-import type { SectionItem } from '@/utils/types'
+import { Section } from '@/utils/interfaces'
-export const sections: SectionItem[] = [
+export const sections: Section[] = [
{
title: 'My job',
titleHighlight: '',
diff --git a/data/projects/work/kooperativa.ts b/data/projects/work/kooperativa.ts
index e32025bb..99ea2b61 100644
--- a/data/projects/work/kooperativa.ts
+++ b/data/projects/work/kooperativa.ts
@@ -1,6 +1,6 @@
-import type { SectionItem } from '@/utils/types'
+import { Section } from '@/utils/interfaces'
-export const sections: SectionItem[] = [
+export const sections: Section[] = [
{
title: 'My job',
titleHighlight: '',
diff --git a/data/projects/work/moravia.ts b/data/projects/work/moravia.ts
index 6c70e827..1e9eb791 100644
--- a/data/projects/work/moravia.ts
+++ b/data/projects/work/moravia.ts
@@ -1,6 +1,6 @@
-import type { SectionItem } from '@/utils/types'
+import { Section } from '@/utils/interfaces'
-export const sections: SectionItem[] = [
+export const sections: Section[] = [
{
title: 'My job',
titleHighlight: '',
diff --git a/data/projects/work/projectsOverview.ts b/data/projects/work/projectsOverview.ts
index 7328ae82..d9834cb7 100644
--- a/data/projects/work/projectsOverview.ts
+++ b/data/projects/work/projectsOverview.ts
@@ -8,7 +8,7 @@ import {
iconsSkillsProjectsWorkSmartsuppWeb,
} from '@/data/skills/skills-projects-work'
import { PAGES_URL, PROJECT_ID } from '@/utils/constants'
-import { Project } from '@/utils/types'
+import { Project } from '@/utils/interfaces'
// moravia
import moravia1 from '@/public/images/projects-work/moravia/moravia-1-light.png'
diff --git a/data/projects/work/smartsuppDashboard.ts b/data/projects/work/smartsuppDashboard.ts
index c55d2262..54b997fa 100644
--- a/data/projects/work/smartsuppDashboard.ts
+++ b/data/projects/work/smartsuppDashboard.ts
@@ -1,6 +1,6 @@
-import type { SectionItem } from '@/utils/types'
+import { Section } from '@/utils/interfaces'
-export const sections: SectionItem[] = [
+export const sections: Section[] = [
{
title: 'My job',
titleHighlight: '',
diff --git a/data/projects/work/smartsuppHelp.ts b/data/projects/work/smartsuppHelp.ts
index 55294996..76824600 100644
--- a/data/projects/work/smartsuppHelp.ts
+++ b/data/projects/work/smartsuppHelp.ts
@@ -1,6 +1,6 @@
-import type { SectionItem } from '@/utils/types'
+import { Section } from '@/utils/interfaces'
-export const sections: SectionItem[] = [
+export const sections: Section[] = [
{
title: 'My job',
titleHighlight: '',
diff --git a/data/projects/work/smartsuppWeb.ts b/data/projects/work/smartsuppWeb.ts
index 64773525..ac943ca5 100644
--- a/data/projects/work/smartsuppWeb.ts
+++ b/data/projects/work/smartsuppWeb.ts
@@ -1,6 +1,6 @@
-import type { SectionItem } from '@/utils/types'
+import { Section } from '@/utils/interfaces'
-export const sections: SectionItem[] = [
+export const sections: Section[] = [
{
title: 'My job',
titleHighlight: '',
diff --git a/utils/generateIconsSkills.ts b/utils/generateIconsSkills.ts
index 5e495397..d862d1f1 100644
--- a/utils/generateIconsSkills.ts
+++ b/utils/generateIconsSkills.ts
@@ -21,7 +21,7 @@ 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 { Icon } from '@/utils/types'
+import { Icon } from '@/utils/interfaces'
type SkillKeys =
| 'chakra'
diff --git a/utils/getSkillBadgeColor.ts b/utils/getSkillBadgeColor.ts
index c7587ad6..17bf59f1 100644
--- a/utils/getSkillBadgeColor.ts
+++ b/utils/getSkillBadgeColor.ts
@@ -1,6 +1,6 @@
-import { CategoryDescriptionType } from '@/utils/types'
+import { SkillCategoryType } from '@/utils/types'
-export const getSkillBadgeColor = (categoryDescription: CategoryDescriptionType): string => {
+export const getSkillBadgeColor = (categoryDescription: SkillCategoryType): string => {
switch (categoryDescription) {
case 'Frontend':
return 'yellow'
diff --git a/utils/interfaces.ts b/utils/interfaces.ts
new file mode 100644
index 00000000..9db2a641
--- /dev/null
+++ b/utils/interfaces.ts
@@ -0,0 +1,44 @@
+import { SkillCategoryType } from './types'
+
+// icons
+export interface Icon {
+ name: string
+ path: string
+}
+
+// sections
+export interface Section {
+ title: string
+ titleHighlight?: string | undefined
+ items: string[]
+}
+
+// project item
+export interface Link {
+ urlText: string
+ url: string
+}
+
+export interface Skill {
+ description: SkillCategoryType
+ skills: string[]
+}
+
+export interface Project {
+ id: string
+ isFeatured?: boolean | undefined
+ image: string
+ imageShowcase: string[]
+ title: string
+ company: string
+ role: string
+ years?: string
+ description: string
+ mySkillsIcons: Icon[]
+ mySkills: Skill[]
+ linkText: string
+ projectLinks: Link[]
+ linkGitHub?: string
+ customers?: string
+ linkProjectPage: string
+}
diff --git a/utils/sharedComponentProps.ts b/utils/sharedComponentProps.ts
new file mode 100644
index 00000000..a019dd6c
--- /dev/null
+++ b/utils/sharedComponentProps.ts
@@ -0,0 +1,25 @@
+import { Link, Skill } from './interfaces'
+import { GoBackLinkType } from './types'
+
+export type HeaderSectionProps = {
+ title: string
+ sectionID: string
+ role: string
+ years?: string | undefined
+ company?: string
+ goBackLink: GoBackLinkType
+}
+
+export type ProjectInformationProps = {
+ description: string
+ mySkills: Skill[]
+ customers?: string | undefined
+ projectLinks: Link[]
+ linkGitHub?: string | undefined
+}
+
+// error pages
+export type ErrorProps = {
+ error: Error & { digest?: string }
+ reset: () => void
+}
diff --git a/utils/types.ts b/utils/types.ts
index 62ca45ca..3052cee3 100644
--- a/utils/types.ts
+++ b/utils/types.ts
@@ -1,75 +1,3 @@
-// icons
-export interface Icon {
- name: string
- path: string
-}
-
-// skills
-export type CategoryDescriptionType = 'Frontend' | 'Design' | 'Other'
-
-export type SkillItem = {
- description: CategoryDescriptionType
- skills: string[]
-}
-
-// project item
-export type LinkItem = {
- urlText: string
- url: string
-}
-
-export type Project = {
- id: string
- isFeatured?: boolean | undefined
- image: string
- imageShowcase: string[]
- title: string
- company: string
- role: string
- years?: string
- description: string
- mySkillsIcons: Icon[]
- mySkills: SkillItem[]
- linkText: string
- projectLinks: LinkItem[]
- linkGitHub?: string
- customers?: string
- linkProjectPage: string
-}
-
-// project sub page
-export type HeaderSectionProps = {
- title: string
- sectionID: string
- role: string
- years?: string | undefined
- company?: string
- goBackLink: GoBackLinkType
-}
-
-export type ProjectInformationProps = {
- description: string
- mySkills: SkillItem[]
- customers?: string | undefined
- projectLinks: LinkItem[]
- linkGitHub?: string | undefined
-}
-
-export type SectionItem = {
- title: string
- titleHighlight?: string | undefined
- items: string[]
-}
-
-// go back link
-export type GoBackLinkType = 'work' | 'personal'
-
-// error pages
-export type ErrorProps = {
- error: Error & { digest?: string }
- reset: () => void
-}
-
// breadcrumbs
export type BreadCrumbsType = {
textLevel1: string
@@ -77,3 +5,9 @@ export type BreadCrumbsType = {
textLevel2?: string
linkLevel2?: string
}
+
+// go back link
+export type GoBackLinkType = 'work' | 'personal'
+
+// skills
+export type SkillCategoryType = 'Frontend' | 'Design' | 'Other'