diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index c76f358..0000000 --- a/.eslintignore +++ /dev/null @@ -1,15 +0,0 @@ -graphql/hooks.ts -next.config.js - -# next-pwa -/public/precache.*.*.js -/public/sw.js -/public/workbox-*.js -/public/worker-*.js -/public/fallback-*.js -/public/precache.*.*.js.map -/public/sw.js.map -/public/workbox-*.js.map -/public/worker-*.js.map -/public/fallback-*.js -/worker \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 6bbb18e..0000000 --- a/.eslintrc +++ /dev/null @@ -1,71 +0,0 @@ -{ - "env": { - "browser": true, - "es2021": true - }, - "extends": [ - "next/core-web-vitals", - "eslint:recommended", - "plugin:react/recommended", - "plugin:@typescript-eslint/recommended", - "plugin:import/warnings", - "plugin:prettier/recommended" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaFeatures": { - "jsx": true - }, - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": ["react", "@typescript-eslint", "typescript-sort-keys", "sort-destructure-keys"], - "rules": { - "react/react-in-jsx-scope": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "no-console": "error", - "no-useless-catch": "off", - "import/no-named-as-default-member": "off", - "typescript-sort-keys/interface": [ - "warn", - "asc", - { "caseSensitive": true, "natural": false, "requiredFirst": true } - ], - "react-hooks/exhaustive-deps": "off", - "sort-destructure-keys/sort-destructure-keys": "warn", - "newline-before-return": "error", - "prettier/prettier": [ - "warn", - { - "endOfLine": "auto", - "arrowParens": "avoid", - "trailingComma": "none" - } - ], - "@typescript-eslint/no-unused-vars": "warn", - "import/order": [ - "warn", - { - "groups": ["builtin", "external", "internal"], - "pathGroups": [ - { - "pattern": "~/**", - "group": "external", - "position": "before" - }, - { - "pattern": "../**", - "group": "internal" - }, - { - "pattern": "./**", - "group": "internal" - } - ], - "pathGroupsExcludedImportTypes": [], - "newlines-between": "always" - } - ] - } -} diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml deleted file mode 100644 index 1593a22..0000000 --- a/.github/workflows/lint-pr.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: "Lint PR title" - -on: - pull_request_target: - branches: "*" - types: - - opened - - edited - - synchronize - -permissions: - pull-requests: write - contents: read - -jobs: - main: - name: Validate PR title - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v5 - id: lint_pr_title - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: marocchino/sticky-pull-request-comment@v2 - # When the previous steps fails, the workflow would stop. By adding this - # condition you can continue the execution with the populated error message. - if: always() && (steps.lint_pr_title.outputs.error_message != null) - with: - header: pr-title-lint-error - message: | - Hey there and thank you for opening this pull request! 👋🏼 - - We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. - - Details: - - ``` - ${{ steps.lint_pr_title.outputs.error_message }} - ``` - - # Delete a previous comment when the issue has been resolved - - if: ${{ steps.lint_pr_title.outputs.error_message == null }} - uses: marocchino/sticky-pull-request-comment@v2 - with: - header: pr-title-lint-error - delete: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 0d16b3a..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Tests & Builds - -on: - push: - branches: [main] - pull_request: - branches: '*' - -jobs: - install: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 20 - - - uses: pnpm/action-setup@v2 - name: Install pnpm - with: - version: 8 - run_install: false - - - name: Install dependencies - run: pnpm install - - - name: Check formatting - run: pnpm lint - - - name: Run tests - run: pnpm test - - - name: Build - run: pnpm build diff --git a/.gitignore b/.gitignore index 8f322f0..12a4feb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,12 @@ # dependencies /node_modules /.pnp -.pnp.js +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions # testing /coverage @@ -23,13 +28,14 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +.pnpm-debug.log* -# local env files -.env*.local +# env files (can opt-in for committing if needed) +.env* # vercel .vercel # typescript *.tsbuildinfo -next-env.d.ts +# next-env.d.ts diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 469753c..0000000 --- a/.prettierrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "singleQuote": true, - "arrowParens": "avoid", - "trailingComma": "none", - "printWidth": 100 -} diff --git a/.stylelintrc b/.stylelintrc deleted file mode 100644 index 2e84313..0000000 --- a/.stylelintrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": [ - "stylelint-config-standard-scss", - "stylelint-config-clean-order", - "stylelint-prettier/recommended" - ], - "ignoreFiles": ["node_modules/**", "coverage/**"], - "plugins": ["stylelint-prettier"], - "rules": { - "selector-pseudo-class-no-unknown": [ - true, - { - "ignorePseudoClasses": ["global"] - } - ], - "prettier/prettier": true - } -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 79350cb..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "cSpell.words": [ - "axendev", - "clsx", - "commitlint", - "datetime", - "fluentui", - "invisionize", - "overscan", - "stylelint", - "Swipeable", - "swiper", - "testid", - "vitnode", - "webp" - ], - "stylelint.validate": ["css", "scss"], - "[css]": { - "editor.defaultFormatter": "stylelint.vscode-stylelint" - }, - "[scss]": { - "editor.defaultFormatter": "stylelint.vscode-stylelint" - }, - "css.validate": false, - "less.validate": false, - "scss.validate": false, - "editor.codeActionsOnSave": { - "source.fixAll.stylelint": "explicit" - } -} diff --git a/README.md b/README.md index 2337e33..e215bc4 100644 --- a/README.md +++ b/README.md @@ -1,55 +1,36 @@ -# (NextJS) aXenDev 2.0 - Portfolio +This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). -Personal portfolio application. +## Getting Started -## ⚠️ Requirements for VSCode - -- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) -- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) -- [StyleLint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint) - -## 🧰 Install - -Use commands: - -```bash -pnpm i -``` - -## 🛠 Run +First, run the development server: ```bash +npm run dev +# or +yarn dev +# or pnpm dev +# or +bun dev ``` -## 🔨 Deployment +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -Command: +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. -```bash -pnpm build -``` - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. -## 💻 Server +## Learn More -Before run server, you need to build project. +To learn more about Next.js, take a look at the following resources: -```bash -pnpm start -``` +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. -## 👍 Tests +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! -- `pnpm t Button.test.tsx` - run only one test `Button.test.tsx` -- `pnpm t:coverage` - run tests coverage for frontend +## Deploy on Vercel -## 👍 Lint +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. -Commands: - -```bash -pnpm lint -pnpm lint:fix -``` +Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/__mocks__/RootMock.tsx b/__mocks__/RootMock.tsx deleted file mode 100644 index 60ff5af..0000000 --- a/__mocks__/RootMock.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { NextIntlClientProvider } from 'next-intl'; -import { ReactNode } from 'react'; - -import messages from '../messages/en.json'; - -interface Props { - children: ReactNode; -} - -export const RootMock = ({ children }: Props) => { - return ( - - {children} - - ); -}; diff --git a/app/[locale]/(main)/[...rest]/page.tsx b/app/[locale]/(main)/[...rest]/page.tsx deleted file mode 100644 index 71d4050..0000000 --- a/app/[locale]/(main)/[...rest]/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { notFound } from 'next/navigation'; - -export default function CatchAllPage() { - notFound(); -} diff --git a/app/[locale]/(main)/contact/page.tsx b/app/[locale]/(main)/contact/page.tsx deleted file mode 100644 index d16d73c..0000000 --- a/app/[locale]/(main)/contact/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from 'next/navigation'; - -export default function Page() { - redirect('https://ips.axendev.net/contact'); -} diff --git a/app/[locale]/(main)/faq/[id]/[childId]/page.tsx b/app/[locale]/(main)/faq/[id]/[childId]/page.tsx deleted file mode 100644 index 53530be..0000000 --- a/app/[locale]/(main)/faq/[id]/[childId]/page.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { Suspense, lazy } from 'react'; -import { Metadata } from 'next'; -import { getTranslations } from 'next-intl/server'; - -import { LoadingView } from '@/views/global/loading/LoadingView'; -import { faqData } from '@/views/faq/faqData'; -import { redirect } from '@/i18n'; - -interface Props { - params: { - childId: string; - id: string; - locale: string; - }; -} - -export async function generateMetadata({ - params: { childId, id, locale } -}: Props): Promise { - const t = await getTranslations({ locale, namespace: 'faq' }); - - const isDataExist = faqData.find(data => data.id === id)?.items.find(item => item.id === childId); - if (!isDataExist) { - redirect('/faq'); - } - - return { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error - title: t(`pages.${id}.${childId}`) - }; -} - -export default async function Page({ params: { childId, id, locale } }: Props) { - const MDXComponent = lazy(() => - import(`@/assets/faq/${id}/${childId}/${childId}-${locale}.mdx`).catch(() => redirect('/faq')) - ); - - return ( - }> - - - ); -} diff --git a/app/[locale]/(main)/faq/[id]/page.tsx b/app/[locale]/(main)/faq/[id]/page.tsx deleted file mode 100644 index 0f87d9c..0000000 --- a/app/[locale]/(main)/faq/[id]/page.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { Suspense, lazy } from 'react'; -import { Metadata } from 'next'; -import { getTranslations } from 'next-intl/server'; - -import { LoadingView } from '@/views/global/loading/LoadingView'; -import { faqData } from '@/views/faq/faqData'; -import { redirect } from '@/i18n'; - -interface Props { - params: { - id: string; - locale: string; - }; -} - -export async function generateMetadata({ params: { id, locale } }: Props): Promise { - const t = await getTranslations({ locale, namespace: 'faq' }); - - const isDataExist = faqData - .map(data => data.items) - .flat() - .find(item => item.id === id); - if (!isDataExist) { - redirect('/faq'); - } - - return { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error - title: t(`pages.global.${id}`) - }; -} - -export default async function Page({ params: { id, locale } }: Props) { - const MDXComponent = lazy(() => - import(`@/assets/faq/${id}/${id}-${locale}.mdx`).catch(() => redirect('/faq')) - ); - - return ( - }> - - - ); -} diff --git a/app/[locale]/(main)/faq/layout.tsx b/app/[locale]/(main)/faq/layout.tsx deleted file mode 100644 index fb8fdbf..0000000 --- a/app/[locale]/(main)/faq/layout.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { ReactNode } from 'react'; -import { getTranslations } from 'next-intl/server'; -import { Metadata } from 'next'; - -import { WrapperFaq } from '@/views/faq/wrapper/WrapperFaq'; -import { CONFIG } from '@/config'; - -interface MetadataProps { - params: { - locale: string; - }; -} - -export async function generateMetadata({ params: { locale } }: MetadataProps): Promise { - const t = await getTranslations({ locale, namespace: 'nav' }); - - return { - title: { - default: t('faq'), - template: `%s - ${t('faq')} - ${CONFIG.title}` - } - }; -} - -interface Props { - children: ReactNode; -} - -export default function Layout({ children }: Props) { - return {children}; -} diff --git a/app/[locale]/(main)/faq/page.tsx b/app/[locale]/(main)/faq/page.tsx deleted file mode 100644 index ad91486..0000000 --- a/app/[locale]/(main)/faq/page.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { getTranslations } from 'next-intl/server'; -import { Suspense, lazy } from 'react'; -import { notFound } from 'next/navigation'; - -import { LoadingView } from '@/views/global/loading/LoadingView'; - -interface Props { - params: { - locale: string; - }; -} - -export async function generateMetadata({ params: { locale } }: Props) { - const t = await getTranslations({ locale, namespace: 'nav' }); - - return { - title: t('faq') - }; -} - -export default function Page({ params: { locale } }: Props) { - const MDXComponent = lazy(() => - import(`@/assets/faq/welcome/welcome-${locale}.mdx`).catch(() => notFound()) - ); - - return ( - }> - - - ); -} diff --git a/app/[locale]/(main)/forum/page.tsx b/app/[locale]/(main)/forum/page.tsx deleted file mode 100644 index ca8d1d8..0000000 --- a/app/[locale]/(main)/forum/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from 'next/navigation'; - -export default function Page() { - redirect('https://ips.axendev.net/'); -} diff --git a/app/[locale]/(main)/products/(products)/error.tsx b/app/[locale]/(main)/products/(products)/error.tsx deleted file mode 100644 index 39d4a0c..0000000 --- a/app/[locale]/(main)/products/(products)/error.tsx +++ /dev/null @@ -1,7 +0,0 @@ -'use client'; - -import { ErrorView } from '@/views/global/error/ErrorView'; - -export default function Error() { - return ; -} diff --git a/app/[locale]/(main)/products/(products)/layout.module.scss b/app/[locale]/(main)/products/(products)/layout.module.scss deleted file mode 100644 index ea2d1c2..0000000 --- a/app/[locale]/(main)/products/(products)/layout.module.scss +++ /dev/null @@ -1,13 +0,0 @@ -@use '@/styles/media' as *; - -.wrapper { - --layout-max-width: 84rem; - - @include mobile { - padding: 0; - } - - display: flex; - gap: 2rem; - align-items: flex-start; -} diff --git a/app/[locale]/(main)/products/(products)/layout.tsx b/app/[locale]/(main)/products/(products)/layout.tsx deleted file mode 100644 index 94bf20d..0000000 --- a/app/[locale]/(main)/products/(products)/layout.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { ReactNode } from 'react'; -import cx from 'clsx'; - -import style from './layout.module.scss'; -import { FiltersProducts } from '@/views/products/filters/FiltersProducts'; -import { HeaderProducts } from '@/views/products/header/HeaderProducts'; -import { MobileFiltersProducts } from '@/views/products/filters/mobile/MobileFiltersProducts'; - -interface Props { - children: ReactNode; -} - -export default function Layout({ children }: Props) { - return ( - <> - - -
- - {children} -
- - ); -} diff --git a/app/[locale]/(main)/products/(products)/loading.tsx b/app/[locale]/(main)/products/(products)/loading.tsx deleted file mode 100644 index dfb6f1a..0000000 --- a/app/[locale]/(main)/products/(products)/loading.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { LoadingView } from '@/views/global/loading/LoadingView'; - -export default function Loading() { - return ; -} diff --git a/app/[locale]/(main)/products/(products)/page.tsx b/app/[locale]/(main)/products/(products)/page.tsx deleted file mode 100644 index 65e236d..0000000 --- a/app/[locale]/(main)/products/(products)/page.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { getTranslations } from 'next-intl/server'; - -import { ProductsView } from '@/views/products/ProductsView'; -import { CONFIG, ExchangeRateToUSD } from '@/config'; - -interface MetadataProps { - params: { - locale: string; - }; -} - -export async function generateMetadata({ params: { locale } }: MetadataProps) { - const t = await getTranslations({ locale, namespace: 'nav' }); - - return { - title: t('products') - }; -} - -const fetchExchangeRateToUSD = async (): Promise => { - const current = await fetch(CONFIG.nbpAPI); - - return current.json(); -}; - -export default async function Page() { - const exchangeRateToUSD = await fetchExchangeRateToUSD(); - const current = exchangeRateToUSD.rates; - - return 0 ? current[0].mid : undefined} />; -} diff --git a/app/[locale]/(main)/products/[id]/page.tsx b/app/[locale]/(main)/products/[id]/page.tsx deleted file mode 100644 index dbc59c5..0000000 --- a/app/[locale]/(main)/products/[id]/page.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { getTranslations } from 'next-intl/server'; -import { notFound } from 'next/navigation'; - -import { ProductView } from '@/views/products/[id]/ProductView'; -import { productsData } from '@/views/products/productsData'; -import { CONFIG, ExchangeRateToUSD } from '@/config'; - -interface Props { - params: { - id: string; - locale: string; - }; -} - -export async function generateMetadata({ params: { id, locale } }: Props) { - const t = await getTranslations({ locale, namespace: 'nav' }); - - const findProduct = productsData.find(product => product.id === id); - - if (findProduct) { - return { - title: `${findProduct.name} - ${t('products')}` - }; - } - - return { - title: t('products') - }; -} - -const fetchExchangeRateToUSD = async (): Promise => { - const current = await fetch(CONFIG.nbpAPI); - - return current.json(); -}; - -export default async function Page({ params: { id } }: Props) { - const findProduct = productsData.find(product => product.id === id); - - if (!findProduct) { - notFound(); - } - - const exchangeRateToUSD = await fetchExchangeRateToUSD(); - const current = exchangeRateToUSD.rates; - - return ( - 0 ? current[0].mid : undefined} /> - ); -} diff --git a/app/[locale]/Provider.tsx b/app/[locale]/Provider.tsx deleted file mode 100644 index a367cf7..0000000 --- a/app/[locale]/Provider.tsx +++ /dev/null @@ -1,29 +0,0 @@ -'use client'; - -import { useFloatingPortalNode } from '@floating-ui/react'; -import { ReactNode } from 'react'; -import { ThemeProvider } from 'next-themes'; - -import { GlobalContext } from '@/hooks/useGlobal'; - -interface Props { - children: ReactNode; -} - -export const Provider = ({ children }: Props) => { - const portalNode = useFloatingPortalNode({ - id: 'floating' - }); - - return ( - - - {children} - - - ); -}; diff --git a/app/[locale]/error.tsx b/app/[locale]/error.tsx deleted file mode 100644 index 39d4a0c..0000000 --- a/app/[locale]/error.tsx +++ /dev/null @@ -1,7 +0,0 @@ -'use client'; - -import { ErrorView } from '@/views/global/error/ErrorView'; - -export default function Error() { - return ; -} diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx deleted file mode 100644 index 455d6a0..0000000 --- a/app/[locale]/layout.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { ReactNode } from 'react'; -import { notFound } from 'next/navigation'; -import { NextIntlClientProvider } from 'next-intl'; -import { Montserrat } from 'next/font/google'; - -import { Layout } from '@/components/layout/Layout'; -import { Provider } from './Provider'; - -const montserrat = Montserrat({ - subsets: ['latin'], - display: 'swap' -}); - -interface Props { - children: ReactNode; - params: { locale: string }; -} - -export default async function LocaleLayout({ children, params: { locale } }: Props) { - let messages; - try { - messages = (await import(`@/messages/${locale}.json`)).default; - } catch (error) { - notFound(); - } - - return ( - - - - - {children} - - - - - ); -} diff --git a/app/[locale]/not-found.tsx b/app/[locale]/not-found.tsx deleted file mode 100644 index af6c18b..0000000 --- a/app/[locale]/not-found.tsx +++ /dev/null @@ -1,7 +0,0 @@ -'use client'; - -import { ErrorView } from '@/views/global/error/ErrorView'; - -export default function NotFoundPage() { - return ; -} diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx deleted file mode 100644 index 328bd42..0000000 --- a/app/[locale]/page.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { HomeView } from '@/views/home/HomeView'; -import { CONFIG, ExchangeRateToUSD } from '@/config'; - -const fetchExchangeRateToUSD = async (): Promise => { - const current = await fetch(CONFIG.nbpAPI); - - return current.json(); -}; - -export default async function Page() { - const exchangeRateToUSD = await fetchExchangeRateToUSD(); - const current = exchangeRateToUSD.rates; - - return 0 ? current[0].mid : undefined} />; -} diff --git a/app/layout.tsx b/app/layout.tsx deleted file mode 100644 index dccdcee..0000000 --- a/app/layout.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { ReactNode } from 'react'; -import { Metadata } from 'next'; -import { Analytics } from '@vercel/analytics/react'; - -import { CONFIG } from '@/config'; -import '@/styles/global.scss'; - -export function generateMetadata(): Metadata { - const desc = - "I'm Maciej Piotr Balcerzak and I'm working as Software Engineer with a passion for creating beautiful and user-friendly products. I have experience in frontend, back-end, testing and UX/UI design, but my primary experience is frontend. Also I'm contributor for Invision Community making themes and apps."; - - return { - title: { - default: CONFIG.title, - template: `%s - ${CONFIG.title}` - }, - icons: { - shortcut: '/icons/favicon.ico', - apple: '/icons/favicon.ico', - icon: '/icons/favicon.ico' - }, - description: desc, - metadataBase: new URL('https://axendev.net/'), - openGraph: { - title: CONFIG.title, - description: desc, - images: [ - { - url: '/icons/og.png', - width: 1050, - height: 350, - alt: CONFIG.title - } - ] - } - }; -} - -interface Props { - children: ReactNode; -} - -export default function RootLayout({ children }: Props) { - return ( - <> - {children} - - - ); -} diff --git a/app/not-found.tsx b/app/not-found.tsx deleted file mode 100644 index ed4705c..0000000 --- a/app/not-found.tsx +++ /dev/null @@ -1,17 +0,0 @@ -'use client'; - -import Error from 'next/error'; - -// Render the default Next.js 404 page when a route -// is requested that doesn't match the middleware and -// therefore doesn't have a locale associated with it. - -export default function NotFound() { - return ( - - - - - - ); -} diff --git a/assets/Logo.tsx b/assets/Logo.tsx deleted file mode 100644 index 5d170f1..0000000 --- a/assets/Logo.tsx +++ /dev/null @@ -1,44 +0,0 @@ -export const Logo = () => ( - - - - - - - - - - - - -); diff --git a/assets/LogoIcon.tsx b/assets/LogoIcon.tsx deleted file mode 100644 index 039256d..0000000 --- a/assets/LogoIcon.tsx +++ /dev/null @@ -1,42 +0,0 @@ -export const LogoIcon = () => ( - - - - - - - - - - -); diff --git a/assets/background/BackgroundSVG.module.scss b/assets/background/BackgroundSVG.module.scss deleted file mode 100644 index 1dfd1a3..0000000 --- a/assets/background/BackgroundSVG.module.scss +++ /dev/null @@ -1,19 +0,0 @@ -.wrapper { - pointer-events: none; - - position: absolute; - top: 0; - left: 0; - - width: 100%; - height: 100%; - - stroke: rgb(var(--border-color)); - - mask-image: radial-gradient(100% 100% at top right, white, transparent); - - > svg { - overflow: visible; - fill: rgb(var(--primary) / 20%); - } -} diff --git a/assets/background/BackgroundSVG.tsx b/assets/background/BackgroundSVG.tsx deleted file mode 100644 index f501a83..0000000 --- a/assets/background/BackgroundSVG.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import style from './BackgroundSVG.module.scss'; - -// From: TailwindUI -export const BackgroundSVG = () => ( - -); diff --git a/assets/faq/collaboration/collaboration-en.mdx b/assets/faq/collaboration/collaboration-en.mdx deleted file mode 100644 index 2007952..0000000 --- a/assets/faq/collaboration/collaboration-en.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# Welcome EN - -I **love** using [Next.js](https://nextjs.org/) - -collaboration diff --git a/assets/faq/collaboration/collaboration-pl.mdx b/assets/faq/collaboration/collaboration-pl.mdx deleted file mode 100644 index 645b265..0000000 --- a/assets/faq/collaboration/collaboration-pl.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# Welcome PL - -I **love** using [Next.js](https://nextjs.org/) - -collaboration diff --git a/assets/faq/collaboration/psd_files/psd_files-en.mdx b/assets/faq/collaboration/psd_files/psd_files-en.mdx deleted file mode 100644 index 34160e8..0000000 --- a/assets/faq/collaboration/psd_files/psd_files-en.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# PSD Files - -Are you coding an app from PSD files? - -> Yes, but it increases the cost of the license about 150%-200%. It's old technology. I recomended you to use Sketch or Figma. diff --git a/assets/faq/collaboration/psd_files/psd_files-pl.mdx b/assets/faq/collaboration/psd_files/psd_files-pl.mdx deleted file mode 100644 index 74b28ca..0000000 --- a/assets/faq/collaboration/psd_files/psd_files-pl.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# Pliki PSD - -Czy kodujesz aplikację z plików PSD? - -> Tak, ale zwiększa to koszt licencji o około 150-200%. To stare narzędzie do projektowania. Zalecam korzystanie z Figmy lub Sketch. diff --git a/assets/faq/collaboration/vat/vat-en.mdx b/assets/faq/collaboration/vat/vat-en.mdx deleted file mode 100644 index c8918b1..0000000 --- a/assets/faq/collaboration/vat/vat-en.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# Vat Invoice - -Do I issue a VAT invoice (PL)? - -> No, I don't have my own company, so all orders are based on a 'umowę o działo' (PL). I do not exclude that such a possibility may appear in the future. diff --git a/assets/faq/collaboration/vat/vat-pl.mdx b/assets/faq/collaboration/vat/vat-pl.mdx deleted file mode 100644 index 17dcff7..0000000 --- a/assets/faq/collaboration/vat/vat-pl.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# Faktura VAT - -Czy wystawiam fakturę VAT (PL)? - -> Nie, nie mam własnej firmy, więc wszystkie zlecenia opierają się na „umówieniu o wykonaniu”. Nie wykluczam, że taka możliwość może się pojawić w przyszłości. diff --git a/assets/faq/technology/technology-en.mdx b/assets/faq/technology/technology-en.mdx deleted file mode 100644 index 39541ab..0000000 --- a/assets/faq/technology/technology-en.mdx +++ /dev/null @@ -1,58 +0,0 @@ -# Technology & Tools - -Here are some of the technologies and tools I use to build my projects. - -## Main - -- [React](https://reactjs.org/) -- [NextJS](https://nextjs.org/) -- [NestJS](https://nestjs.com/) -- [TypeScript](https://www.typescriptlang.org/) -- [PHP](https://www.php.net/) -- [React Native](https://reactnative.dev/) -- [NodeJS](https://nodejs.org/en/) -- [SCSS](https://sass-lang.com/) -- [IPS Community Suite](https://invisioncommunity.com/) -- [Styled Components](https://styled-components.com/) - -### Tests - -- [Vitest](https://vitejs.dev/) -- [Playwright](https://playwright.dev/) -- [Jest](https://jestjs.io/) -- [Cypress](https://www.cypress.io/) - -### Databases - -- [PostgreSQL](https://www.postgresql.org/) -- [MySQL](https://www.mysql.com/) -- [MongoDB](https://www.mongodb.com/) -- [Redis](https://redis.io/) - -### API - -- [GraphQL](https://graphql.org/) -- [Rest API](https://restfulapi.net/) - -### Basic - -- [Angular](https://angular.io/) -- [Smarty](https://www.smarty.net/) -- [jQuery](https://jquery.com/) -- [C#](https://docs.microsoft.com/en-us/dotnet/csharp/) -- [.Net](https://dotnet.microsoft.com/) - -## Tools - -- [VSCode](https://code.visualstudio.com/) -- [Figma](https://www.figma.com/) -- [Lighthouse](https://developer.chrome.com/docs/lighthouse/overview/) -- [ESlint](https://eslint.org/) -- [Prettier](https://prettier.io/) -- [Git](https://git-scm.com/) -- [StyleLint](https://stylelint.io/) - -### Deprecated - -- [Photoshop](https://www.adobe.com/products/photoshop.html) -- [Illustrator](https://www.adobe.com/products/illustrator.html) diff --git a/assets/faq/technology/technology-pl.mdx b/assets/faq/technology/technology-pl.mdx deleted file mode 100644 index 24d0dd3..0000000 --- a/assets/faq/technology/technology-pl.mdx +++ /dev/null @@ -1,58 +0,0 @@ -# Technologie i narzędzia - -Tutaj znajdziesz listę technologii, których używam w swojej pracy. - -## Główne - -- [React](https://reactjs.org/) -- [NextJS](https://nextjs.org/) -- [NestJS](https://nestjs.com/) -- [TypeScript](https://www.typescriptlang.org/) -- [PHP](https://www.php.net/) -- [React Native](https://reactnative.dev/) -- [NodeJS](https://nodejs.org/en/) -- [SCSS](https://sass-lang.com/) -- [IPS Community Suite](https://invisioncommunity.com/) -- [Styled Components](https://styled-components.com/) - -### Testy - -- [Vitest](https://vitejs.dev/) -- [Playwright](https://playwright.dev/) -- [Jest](https://jestjs.io/) -- [Cypress](https://www.cypress.io/) - -### Bazy danych - -- [PostgreSQL](https://www.postgresql.org/) -- [MySQL](https://www.mysql.com/) -- [MongoDB](https://www.mongodb.com/) -- [Redis](https://redis.io/) - -### API - -- [GraphQL](https://graphql.org/) -- [Rest API](https://restfulapi.net/) - -### Podstawowe - -- [Angular](https://angular.io/) -- [Smarty](https://www.smarty.net/) -- [jQuery](https://jquery.com/) -- [C#](https://docs.microsoft.com/en-us/dotnet/csharp/) -- [.Net](https://dotnet.microsoft.com/) - -## Narzędzia - -- [VSCode](https://code.visualstudio.com/) -- [Figma](https://www.figma.com/) -- [Lighthouse](https://developer.chrome.com/docs/lighthouse/overview/) -- [ESlint](https://eslint.org/) -- [Prettier](https://prettier.io/) -- [Git](https://git-scm.com/) -- [StyleLint](https://stylelint.io/) - -### Przestarzałe - -- [Photoshop](https://www.adobe.com/products/photoshop.html) -- [Illustrator](https://www.adobe.com/products/illustrator.html) diff --git a/assets/faq/transfer_products_from_ips_marketplace/transfer_products_from_ips_marketplace-en.mdx b/assets/faq/transfer_products_from_ips_marketplace/transfer_products_from_ips_marketplace-en.mdx deleted file mode 100644 index dfd5b53..0000000 --- a/assets/faq/transfer_products_from_ips_marketplace/transfer_products_from_ips_marketplace-en.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Transfer products from IPS Marketplace to Invisionize - -As you know IPS Marketplace is closing October 30, 2023 ([You can read more here](https://invisioncommunity.com/news/invision-community/marketplace-closure-r1283/)) and I am moving all products to [Invisionize](https://forum.invisionize.pl/). - -## How to transfer license of my products? - -1. Go to [IPS Marketplace](https://invisioncommunity.com/marketplace/) and save your license keys of products, -2. Sign up on [Invisionize](https://forum.invisionize.pl/), -3. Go to [Invisionize Keys](https://forum.invisionize.pl/keys/) and enter your license keys here from [IPS Marketplace](https://invisioncommunity.com/marketplace/), -4. Done! You can download your products. diff --git a/assets/faq/transfer_products_from_ips_marketplace/transfer_products_from_ips_marketplace-pl.mdx b/assets/faq/transfer_products_from_ips_marketplace/transfer_products_from_ips_marketplace-pl.mdx deleted file mode 100644 index 636b144..0000000 --- a/assets/faq/transfer_products_from_ips_marketplace/transfer_products_from_ips_marketplace-pl.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Przenoszenie produktów z IPS Marketplace do Invisionize - -Jak już wiesz IPS Marketplace zamyka się 30 Października 2023r. ([Więcej możesz przeczytać tutaj](https://invisioncommunity.com/news/invision-community/marketplace-closure-r1283/)) i przenoszę wszystkie produkty do [Invisionize](https://forum.invisionize.pl/). - -## Jak przenieść licencję moich produktów? - -1. Przejdź do [IPS Marketplace](https://invisioncommunity.com/marketplace/) i zapisz swoje klucze licencyjne produktów, -2. Zarejestruj się na [Invisionize](https://forum.invisionize.pl/), -3. Przejdź do [Invisionize Klucze](https://forum.invisionize.pl/keys/) i wpisz swoje klucze licencyjne z [IPS Marketplace](https://invisioncommunity.com/marketplace/), -4. Gotowe! Możesz teraz pobrać produkty. diff --git a/assets/faq/welcome/welcome-en.mdx b/assets/faq/welcome/welcome-en.mdx deleted file mode 100644 index 32ebcc6..0000000 --- a/assets/faq/welcome/welcome-en.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# Introduction - -Welcome to the **aXenDev** FAQ! - -In this FAQ section you will find answers to the most frequently asked questions about my skills and experience as a developer. If you have any other questions not listed here, please don't hesitate to [contact me](/contact). diff --git a/assets/faq/welcome/welcome-pl.mdx b/assets/faq/welcome/welcome-pl.mdx deleted file mode 100644 index 5bf6877..0000000 --- a/assets/faq/welcome/welcome-pl.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# Wstęp - -Witaj na **aXenDev** FAQ! - -W tej sekcji FAQ znajdziesz odpowiedzi na najczęściej zadawane pytania dotyczące moich umiejętności i doświadczenia jako programisty. Jeśli masz inne pytania, które nie zostały wymienione tutaj, nie wahaj się ze [mną skontaktować](/contact). diff --git a/assets/hobbies/CookingIcon.tsx b/assets/hobbies/CookingIcon.tsx deleted file mode 100644 index 656baab..0000000 --- a/assets/hobbies/CookingIcon.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export const CookingIcon = () => ( - - - -); diff --git a/assets/hobbies/GameIcon.tsx b/assets/hobbies/GameIcon.tsx deleted file mode 100644 index 71c7213..0000000 --- a/assets/hobbies/GameIcon.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export const GameIcon = () => ( - - - -); diff --git a/assets/hobbies/GymIcon.tsx b/assets/hobbies/GymIcon.tsx deleted file mode 100644 index fe1be35..0000000 --- a/assets/hobbies/GymIcon.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export const GymIcon = () => ( - - - -); diff --git a/assets/person.webp b/assets/person.webp deleted file mode 100644 index 09d968b..0000000 Binary files a/assets/person.webp and /dev/null differ diff --git a/assets/socials/GithubIcon.tsx b/assets/socials/GithubIcon.tsx deleted file mode 100644 index 553dcf1..0000000 --- a/assets/socials/GithubIcon.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export const GithubIcon = () => ( - - - -); diff --git a/assets/socials/TwitterIcon.tsx b/assets/socials/TwitterIcon.tsx deleted file mode 100644 index 6086ec3..0000000 --- a/assets/socials/TwitterIcon.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export const TwitterIcon = () => ( - - - -); diff --git a/assets/technologies/FigmaIcon.tsx b/assets/technologies/FigmaIcon.tsx deleted file mode 100644 index d60a576..0000000 --- a/assets/technologies/FigmaIcon.tsx +++ /dev/null @@ -1,31 +0,0 @@ -export const FigmaIcon = () => ( - - - - - - - - - - - - - - -); diff --git a/assets/technologies/NestJSIcon.tsx b/assets/technologies/NestJSIcon.tsx deleted file mode 100644 index 4496f81..0000000 --- a/assets/technologies/NestJSIcon.tsx +++ /dev/null @@ -1,16 +0,0 @@ -export const NestJSIcon = () => ( - - - -); diff --git a/assets/technologies/NextJSIcon.tsx b/assets/technologies/NextJSIcon.tsx deleted file mode 100644 index 3d63bff..0000000 --- a/assets/technologies/NextJSIcon.tsx +++ /dev/null @@ -1,38 +0,0 @@ -export const NextJSIcon = () => ( - - - - - - - - - - -); diff --git a/assets/technologies/NodeJSIcon.tsx b/assets/technologies/NodeJSIcon.tsx deleted file mode 100644 index 9728c25..0000000 --- a/assets/technologies/NodeJSIcon.tsx +++ /dev/null @@ -1,14 +0,0 @@ -export const NodeJSIcon = () => ( - - - -); diff --git a/assets/technologies/PhpIcon.tsx b/assets/technologies/PhpIcon.tsx deleted file mode 100644 index bd60cd9..0000000 --- a/assets/technologies/PhpIcon.tsx +++ /dev/null @@ -1,16 +0,0 @@ -export const PhpIcon = () => ( - - - - - -); diff --git a/assets/technologies/PlaywrightIcon.tsx b/assets/technologies/PlaywrightIcon.tsx deleted file mode 100644 index 275f831..0000000 --- a/assets/technologies/PlaywrightIcon.tsx +++ /dev/null @@ -1,38 +0,0 @@ -export const PlaywrightIcon = () => ( - - - - - - - - - -); diff --git a/assets/technologies/ReactIocn.tsx b/assets/technologies/ReactIocn.tsx deleted file mode 100644 index 1bfc23b..0000000 --- a/assets/technologies/ReactIocn.tsx +++ /dev/null @@ -1,16 +0,0 @@ -export const ReactIcon = () => ( - - - - - - - - -); diff --git a/assets/technologies/ScssIcon.tsx b/assets/technologies/ScssIcon.tsx deleted file mode 100644 index 6bb1765..0000000 --- a/assets/technologies/ScssIcon.tsx +++ /dev/null @@ -1,15 +0,0 @@ -export const ScssIcon = () => ( - - - - - - - - - - -); diff --git a/assets/technologies/TypescriptIcon.tsx b/assets/technologies/TypescriptIcon.tsx deleted file mode 100644 index 2c3ee33..0000000 --- a/assets/technologies/TypescriptIcon.tsx +++ /dev/null @@ -1,14 +0,0 @@ -export const TypescriptIcon = () => ( - - - -); diff --git a/assets/technologies/VitestIcon.tsx b/assets/technologies/VitestIcon.tsx deleted file mode 100644 index fd0fbb3..0000000 --- a/assets/technologies/VitestIcon.tsx +++ /dev/null @@ -1,35 +0,0 @@ -export const VitestIcon = () => ( - - - - - - - - - - - - - - - - - -); diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000..d70a08d Binary files /dev/null and b/bun.lockb differ diff --git a/components/badge/Badge.module.scss b/components/badge/Badge.module.scss deleted file mode 100644 index c583a63..0000000 --- a/components/badge/Badge.module.scss +++ /dev/null @@ -1,15 +0,0 @@ -$types: 'info', 'success', 'warning', 'error'; - -.wrapper { - display: inline-block; - padding: 0.2rem 0.5rem; - border: 1px solid transparent; - border-radius: var(--radius); - - @each $type in $types { - &.#{$type} { - color: rgb(var(--message-#{$type})); - border-color: rgb(var(--message-#{$type}) / 15%); - } - } -} diff --git a/components/badge/Badge.test.tsx b/components/badge/Badge.test.tsx deleted file mode 100644 index fa9db92..0000000 --- a/components/badge/Badge.test.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { render } from '@testing-library/react'; -import { expect, describe, it } from 'vitest'; - -import { Badge } from './Badge'; -import { MessageKindTypes } from '../message/Message'; - -describe('Badge', () => { - it('renders children', () => { - const { getByText } = render(Hello World); - expect(getByText('Hello World')).toBeDefined(); - }); - - it.each<{ kind: MessageKindTypes }>([ - { kind: 'info' }, - { kind: 'error' }, - { kind: 'success' }, - { kind: 'warning' } - ])('renders $kind kind', ({ kind }) => { - const { getByText } = render(Hello World); - const badge = getByText('Hello World'); - - expect(badge.className).toMatch(kind); - }); -}); diff --git a/components/badge/Badge.tsx b/components/badge/Badge.tsx deleted file mode 100644 index 5cadc16..0000000 --- a/components/badge/Badge.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { ReactNode } from 'react'; -import cx from 'clsx'; - -import style from './Badge.module.scss'; -import { MessageKindTypes } from '../message/Message'; - -interface Props { - children: ReactNode; - className?: string; - kind?: MessageKindTypes; -} - -export const Badge = ({ children, className, kind = 'info' }: Props) => ( - {children} -); diff --git a/components/button/Button.module.scss b/components/button/Button.module.scss deleted file mode 100644 index 59498cf..0000000 --- a/components/button/Button.module.scss +++ /dev/null @@ -1,49 +0,0 @@ -$kinds: 'primary', 'secondary'; - -.wrapper { - cursor: pointer; - - display: flex; - gap: 0.5rem; - align-items: center; - justify-content: center; - - min-height: 2.5rem; - padding: 0.5rem 1.5rem; - - font-family: inherit; - font-weight: 500; - text-align: center; - - border: 1px solid transparent; - border-radius: var(--radius); - - transition: - background-color var(--animation), - border-color var(--animation), - color var(--animation); - - &:hover { - text-decoration: none; - } - - &.icon { - width: 2.5rem; - height: 2.5rem; - padding: 0; - } - - @each $kind in $kinds { - &.#{$kind} { - color: rgb(var(--button-#{$kind}-color)); - background-color: rgb(var(--button-#{$kind})); - border-color: rgb(var(--button-#{$kind}-border)); - - &:hover { - color: rgb(var(--button-#{$kind}-hover-color)); - background-color: rgb(var(--button-#{$kind}-hover)); - border-color: rgb(var(--button-#{$kind}-hover-border)); - } - } - } -} diff --git a/components/button/Button.test.tsx b/components/button/Button.test.tsx deleted file mode 100644 index 0b5f5ac..0000000 --- a/components/button/Button.test.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { render, fireEvent, waitFor } from '@testing-library/react'; -import { expect, describe, it } from 'vitest'; - -import { Button } from './Button'; - -import { RootMock } from '../../__mocks__/RootMock'; - -describe('Button', () => { - it('renders children', () => { - const { getByText } = render(); - expect(getByText('Hello World')).toBeDefined(); - }); - - it('renders a button element', () => { - const { getByTestId } = render(); - const button = getByTestId('button_test'); - expect(button.tagName).toBe('BUTTON'); - }); - - it('renders an anchor element when href is provided', () => { - const { getByTestId } = render( - , - { wrapper: RootMock } - ); - const button = getByTestId('button_test'); - expect(button.tagName).toBe('A'); - }); - - it('renders an anchor element with target="_blank" when externalLink is true', () => { - const { getByTestId } = render( - - ); - const button = getByTestId('button_test'); - expect(button.tagName).toBe('A'); - expect(button.getAttribute('target')).toBe('_blank'); - }); - - it('renders a Tooltip component when iconOnlyText is provided', async () => { - const { getByRole, getByTestId } = render( - - ); - const button = getByTestId('button_test'); - - fireEvent.mouseEnter(button); - - await waitFor(() => { - expect(getByRole('tooltip')).toBeDefined(); - }); - }); -}); diff --git a/components/button/Button.tsx b/components/button/Button.tsx deleted file mode 100644 index 4016360..0000000 --- a/components/button/Button.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { MouseEvent, ReactNode } from 'react'; -import cx from 'clsx'; - -import style from './Button.module.scss'; -import { Tooltip } from '../tooltip/Tooltip'; -import { Link } from '@/i18n'; - -interface Props { - children: ReactNode; - id: string; - className?: string; - externalLink?: boolean; - href?: string; - iconOnlyText?: string; - kind?: 'primary' | 'secondary'; - onClick?: (e: MouseEvent) => void; -} - -export const Button = ({ - children, - className, - externalLink, - href, - iconOnlyText, - id, - kind = 'primary', - onClick -}: Props) => { - const rest = { - className: cx(style.wrapper, style[kind], className, { - [style.icon]: iconOnlyText - }), - ['data-testid']: `button_${id}`, - onClick - }; - - const content = () => { - if (externalLink) { - return ( - - {children} - - ); - } - - if (href) { - return ( - - {children} - - ); - } - - return ; - }; - - if (iconOnlyText) { - return {content()}; - } - - return content(); -}; diff --git a/components/dateFormat/DateFormat.test.tsx b/components/dateFormat/DateFormat.test.tsx deleted file mode 100644 index 7bf7e82..0000000 --- a/components/dateFormat/DateFormat.test.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { render } from '@testing-library/react'; -import { expect, describe, it } from 'vitest'; - -import { DateFormat } from './DateFormat'; - -import { RootMock } from '../../__mocks__/RootMock'; - -describe('DateFormat ', () => { - it('renders with date and time', () => { - const { getByText } = render(, { wrapper: RootMock }); - expect(getByText('01/01/2022, 12:00 PM')).toBeDefined(); - }); - - it('renders with UTC time', () => { - const { getByText } = render(, { wrapper: RootMock }); - expect(getByText('01/01/2022, 12:00 PM')).toBeDefined(); - }); -}); diff --git a/components/dateFormat/DateFormat.tsx b/components/dateFormat/DateFormat.tsx deleted file mode 100644 index cfa4c27..0000000 --- a/components/dateFormat/DateFormat.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { format } from 'date-fns'; -import { enUS, pl } from 'date-fns/locale'; -import { useLocale } from 'next-intl'; - -import { convertUnixTime } from '../../functions/convertUnixTime/convertUnixTime'; - -interface Props { - date: number; - showUTC?: boolean; -} - -export const DateFormat = ({ date, showUTC }: Props) => { - const locale = useLocale(); - const currentTime = convertUnixTime(date); - const currentTimeWithUtc = showUTC - ? new Date( - new Date(currentTime).toLocaleString('en-US', { - timeZone: 'UTC' - }) - ) - : currentTime; - - const getDateFormat = (dateFormat: string) => - format(currentTimeWithUtc, dateFormat, { - /* c8 ignore next 1 */ - locale: locale === 'pl' ? pl : enUS - }); - - const fullDate = getDateFormat('P, p'); - - return {fullDate}; -}; diff --git a/components/img/Img.module.scss b/components/img/Img.module.scss deleted file mode 100644 index 58ae5d0..0000000 --- a/components/img/Img.module.scss +++ /dev/null @@ -1,5 +0,0 @@ -.wrapper { - position: relative; - overflow: hidden; - line-height: 0; -} diff --git a/components/img/Img.tsx b/components/img/Img.tsx deleted file mode 100644 index 05c0df4..0000000 --- a/components/img/Img.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { CSSProperties } from 'react'; -import Image, { StaticImageData } from 'next/image'; -import cx from 'clsx'; - -import styleModule from './Img.module.scss'; - -interface InitialProps { - alt: string; - src: string | StaticImageData; - className?: string; - priority?: boolean; - quality?: number; - style?: CSSProperties; -} - -interface PropsWithWidthAndHeight extends InitialProps { - height: number; - width: number; - fill?: never; - heightLoading?: number; - sizes?: string; -} - -interface PropsWithFill extends InitialProps { - fill: true; - sizes: string; - height?: never; - heightLoading?: number; - width?: never; -} - -export type ImgProps = PropsWithWidthAndHeight | PropsWithFill; - -export const Img = ({ - alt, - className, - fill, - height, - heightLoading, - priority, - quality, - sizes, - src, - style, - width -}: ImgProps) => { - return ( -
- {alt} -
- ); -}; diff --git a/components/inputs/checkbox/Checkbox.module.scss b/components/inputs/checkbox/Checkbox.module.scss deleted file mode 100644 index 31cbffc..0000000 --- a/components/inputs/checkbox/Checkbox.module.scss +++ /dev/null @@ -1,23 +0,0 @@ -.wrapper { - flex-shrink: 0; - - width: 1rem; - height: 1rem; - margin: 0; - padding: 0; - - appearance: none; - background-color: rgb(var(--container-background)); - border: 1px solid rgb(var(--input-border)); - border-radius: var(--radius-2); - - transition: - border-color var(--animation), - box-shadow var(--animation); - - &:checked { - background-color: rgb(var(--primary)); - background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.95837 9.67517L2.74578 7.46258C2.63577 7.35632 2.48841 7.29753 2.33547 7.29886C2.18252 7.30019 2.03621 7.36153 1.92806 7.46969C1.8199 7.57784 1.75855 7.72415 1.75722 7.8771C1.7559 8.03005 1.81469 8.1774 1.92095 8.28742L4.54595 10.9124C4.65534 11.0218 4.80369 11.0832 4.95837 11.0832C5.11305 11.0832 5.26139 11.0218 5.37078 10.9124L11.7875 4.49575C11.8937 4.38573 11.9525 4.23838 11.9512 4.08543C11.9498 3.93248 11.8885 3.78618 11.7803 3.67802C11.6722 3.56987 11.5259 3.50852 11.3729 3.50719C11.22 3.50586 11.0726 3.56466 10.9626 3.67092L4.95837 9.67517Z' fill='white'/%3E%3C/svg%3E%0A"); - border-color: rgb(var(--primary)); - } -} diff --git a/components/inputs/checkbox/Checkbox.tsx b/components/inputs/checkbox/Checkbox.tsx deleted file mode 100644 index 877deb3..0000000 --- a/components/inputs/checkbox/Checkbox.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { ChangeEvent } from 'react'; - -import style from './Checkbox.module.scss'; - -interface Props { - checked: boolean; - onChange: (event: ChangeEvent) => void; - tabIndex?: number; -} - -export const Checkbox = ({ checked, onChange, tabIndex }: Props) => { - return ( - - ); -}; diff --git a/components/layout/Layout.tsx b/components/layout/Layout.tsx deleted file mode 100644 index 96bfa53..0000000 --- a/components/layout/Layout.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { ReactNode } from 'react'; - -import { Header } from './header/Header'; -import { Footer } from './footer/Footer'; - -interface Props { - children: ReactNode; -} - -export const Layout = ({ children }: Props) => { - return ( - <> -
- {children} -