Skip to content

Commit

Permalink
refactor(index.ts): 👷 Use direct imports
Browse files Browse the repository at this point in the history
  • Loading branch information
krsiakdaniel committed Dec 23, 2024
1 parent d68dbd9 commit b165bb7
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 38 deletions.
3 changes: 2 additions & 1 deletion app/personal-projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import ProjectsLayout from '@/components/layout/ProjectsLayout'
import PageNavigation from '@/components/page-navigation/PageNavigation'
import { ProjectSection } from '@/components/projects/overview-page/ProjectSection'
import BreadCrumbs from '@/components/shared/Breadcrumbs'
import { projectsPersonalNext, projectsPersonalReact } from '@/data/projects/personal/projects-overview'
import { projectsPersonalNext } from '@/data/projects/personal/projects-overview/personalNext'
import { projectsPersonalReact } from '@/data/projects/personal/projects-overview/personalReact'
import { TEXT } from '@/localization/english'
import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds'
import { ID } from '@/utils/constants/ids/elementIds'
Expand Down
2 changes: 1 addition & 1 deletion components/about-me/JobItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type JobItemProps = {
years: number
}

interface JobIconProps {
type JobIconProps = {
path: string
title: string
}
Expand Down
3 changes: 2 additions & 1 deletion components/header/menu/MenuToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client' // using onClick

import { IconClose, IconHamburger } from '@/components/icons'
import { IconClose } from '@/components/icons/IconClose'
import { IconHamburger } from '@/components/icons/IconHamburger'
import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds'
import { ID } from '@/utils/constants/ids/elementIds'

Expand Down
8 changes: 0 additions & 8 deletions components/icons/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion components/layout/project-page/Gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds'
import { ImageShowcaseItem } from '@/utils/interfaces/interfaces'
import Image from 'next/image'

interface GalleryProps {
type GalleryProps = {
imageShowcase: ImageShowcaseItem[]
}

Expand Down
2 changes: 1 addition & 1 deletion components/layout/project-page/HeaderSection.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconArrow } from '@/components/icons'
import { IconArrow } from '@/components/icons/IconArrow'
import Heading1 from '@/components/shared/Heading1'
import Heading2 from '@/components/shared/Heading2'
import { getGoBackLinkID } from '@/utils/helpers/getGoBackLink'
Expand Down
2 changes: 1 addition & 1 deletion components/page-navigation/PageNavigationLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconArrow } from '@/components/icons'
import { IconArrow } from '@/components/icons/IconArrow'

const LEFT = 'left'
const RIGHT = 'right'
Expand Down
2 changes: 1 addition & 1 deletion components/projects/overview-page/ProjectItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconArrow } from '@/components/icons'
import { IconArrow } from '@/components/icons/IconArrow'
import Heading2 from '@/components/shared/Heading2'
import { Icon } from '@/utils/interfaces/interfaces'
import Image from 'next/image'
Expand Down
2 changes: 1 addition & 1 deletion components/shared/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconCaretRight } from '@/components/icons'
import { IconCaretRight } from '@/components/icons/IconCaretRight'
import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds'
import { BreadCrumbsType } from '@/utils/interfaces/types'
import Link from 'next/link'
Expand Down
2 changes: 1 addition & 1 deletion components/shared/HighlightedText.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from 'react'

interface HighlightedTextProps {
type HighlightedTextProps = {
children: ReactNode
}

Expand Down
2 changes: 1 addition & 1 deletion components/shared/ListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconCheck } from '@/components/icons'
import { IconCheck } from '@/components/icons/IconCheck'

type ListItemProps = {
children: React.ReactNode
Expand Down
2 changes: 0 additions & 2 deletions data/projects/personal/projects-overview/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions data/projects/work/projects-overview/index.ts

This file was deleted.

30 changes: 17 additions & 13 deletions data/statusPage/index.ts
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
interface StatusBadge {
name: string
src: string
alt: string
width: number
height: number
}
import { StatusBadge } from '@/utils/interfaces/interfaces'

const IMAGE_JEST_TESTS =
'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz/actions/workflows/jest.yml/badge.svg'
const IMAGE_PLAYWRIGHT_TESTS =
'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz/actions/workflows/playwright.yml/badge.svg'
const IMAGE_CODEQL =
'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz/actions/workflows/github-code-scanning/codeql/badge.svg'
const IMAGE_CODE_QUALITY = 'https://app.codacy.com/project/badge/Grade/eaa72f9b0a7242ae9179b0dfdd58faf5'
const IMAGE_DEPENDABOT = 'https://img.shields.io/badge/Dependabot-Enabled-green'
const IMAGE_NETLIFY = 'https://api.netlify.com/api/v1/badges/eb322254-0169-4941-9416-3806b0bd5be6/deploy-status'

export const statusBadges: StatusBadge[] = [
{
name: 'Jest Tests',
src: 'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz/actions/workflows/jest.yml/badge.svg',
src: IMAGE_JEST_TESTS,
alt: 'Jest Tests',
width: 132,
height: 20,
},
{
name: 'Playwright Tests',
src: 'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz/actions/workflows/playwright.yml/badge.svg',
src: IMAGE_PLAYWRIGHT_TESTS,
alt: 'Playwright Tests',
width: 167,
height: 20,
},
{
name: 'CodeQL',
src: 'https://github.com/krsiakdaniel/portfolio-website-krsiak-cz/actions/workflows/github-code-scanning/codeql/badge.svg',
src: IMAGE_CODEQL,
alt: 'CodeQL',
width: 120,
height: 40,
},
{
name: 'Code Quality',
src: 'https://app.codacy.com/project/badge/Grade/eaa72f9b0a7242ae9179b0dfdd58faf5',
src: IMAGE_CODE_QUALITY,
alt: 'Code Quality',
width: 120,
height: 20,
},
{
name: 'Dependabot',
src: 'https://img.shields.io/badge/Dependabot-Enabled-green',
src: IMAGE_DEPENDABOT,
alt: 'Dependabot',
width: 130,
height: 20,
},
{
name: 'Netlify',
src: 'https://api.netlify.com/api/v1/badges/eb322254-0169-4941-9416-3806b0bd5be6/deploy-status',
src: IMAGE_NETLIFY,
alt: 'Netlify',
width: 118,
height: 20,
Expand Down
9 changes: 9 additions & 0 deletions utils/interfaces/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,12 @@ export interface SkillCard {
years: number
description: string
}

// status page
export interface StatusBadge {
name: string
src: string
alt: string
width: number
height: number
}

0 comments on commit b165bb7

Please sign in to comment.