Skip to content

Commit

Permalink
Merge pull request #31 from taxepfa/dev
Browse files Browse the repository at this point in the history
Update deps, enable next.js turbo dev mode, update header & footer, fix FX issue, update GitHub workflow versions
  • Loading branch information
icflorescu authored Apr 22, 2024
2 parents db4e859 + f0f5faa commit a28f119
Show file tree
Hide file tree
Showing 11 changed files with 1,973 additions and 2,134 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
next.config.js
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn
- name: Restore cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.next/cache
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Build
run: yarn build
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ./out

Expand All @@ -60,4 +60,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Ionuț-Cristian Florescu
Copyright (c) 2023 - 2024 Ionuț-Cristian Florescu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 6 additions & 7 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { Text } from '@mantine/core';
import { AUTHOR_NAME, AUTHOR_URL } from '~/lib/config';
import { AUTHOR_NAME, AUTHOR_URL, LICENSE_URL, REPO_URL } from '~/lib/config';
import { ExternalLink } from './ExternalLink';
import classes from './Footer.module.css';

export function Footer() {
return (
<div className={classes.root}>
<Text size="sm" ta="center">
Realizat de <ExternalLink to={AUTHOR_URL}>{AUTHOR_NAME}</ExternalLink>
.
&copy; <ExternalLink to={AUTHOR_URL}>{AUTHOR_NAME}</ExternalLink> 2023 &mdash; {new Date().getFullYear()}.
<br />
Codul-sursă este disponibil pe GitHub.
Acest proiect este open-source, codul este public și{' '}
<ExternalLink to={REPO_URL}>disponibil pe GitHub</ExternalLink> sub{' '}
<ExternalLink to={LICENSE_URL}>licență MIT</ExternalLink>.
<br />
Dacă ești dezvoltator, ar trebui să știi unde și cum să contribui.
<br />
Dacă lucrezi ca PFA, te-ar putea interesa și <ExternalLink to="https://swapp.ro">swapp.ro</ExternalLink>.
Dacă ai găsit o eroare și ești dezvoltator, ar trebui să știi unde și cum să contribui.
</Text>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion components/Title.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
}

.logo {
margin-top: rem(-6px);
margin-top: rem(-4px);
}

.text {
Expand Down
2 changes: 2 additions & 0 deletions lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export const APP_URL = 'https://taxepfa.github.io';
export const APP_NAME = `Taxe PFA în ${YEAR}`;
export const AUTHOR_NAME = 'Ionuț-Cristian Florescu';
export const AUTHOR_URL = 'https://github.com/icflorescu';
export const REPO_URL = 'https://github.com/taxepfa/taxepfa.github.io';
export const LICENSE_URL = 'https://github.com/taxepfa/taxepfa.github.io/blob/main/LICENSE';

export const WEEKS_PER_YEAR = 52.1429;
export const WEEKS_PER_MONTH = 4.34524;
Expand Down
2 changes: 1 addition & 1 deletion lib/exchangeRates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type ExchangeRates = Record<string, number>;

export function useExchangeRates() {
const { data, isLoading } = useSWR(
`https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/${BASE_CURRENCY_LOWER_CASE.toLowerCase()}.min.json`,
`https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies/${BASE_CURRENCY_LOWER_CASE.toLowerCase()}.min.json`,
fetcher,
{
refreshInterval: EXCHANGE_RATES_RELOAD_INTERVAL,
Expand Down
16 changes: 9 additions & 7 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ const { version: APP_VERSION } = require('./package.json');

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
output: 'export',
compiler: {
removeConsole: process.env.NODE_ENV === 'production',
},
env: {
APP_VERSION,
env: { APP_VERSION },
experimental: {
optimizePackageImports: [
'@mantine/core',
'@mantine/dates',
'@mantine/hooks',
'@mantine/modals',
'@mantine/notifications',
],
},
};

Expand Down
48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
{
"name": "taxepfa.github.io",
"version": "1.0.2",
"version": "1.1.0",
"description": "A simple application to compute freelance taxes in Romania",
"private": true,
"scripts": {
"dev": "next dev",
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"devDependencies": {
"@ducanh2912/next-pwa": "^9.7.2",
"@mantine/core": "7.1.5",
"@mantine/hooks": "7.1.5",
"@mantine/notifications": "^7.1.5",
"@tabler/icons-react": "^2.39.0",
"@types/node": "20.8.8",
"@types/react": "18.2.31",
"@types/react-dom": "18.2.14",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"clsx": "^2.0.0",
"eslint": "8.52.0",
"eslint-config-next": "13.5.6",
"eslint-config-prettier": "^9.0.0",
"next": "13.5.6",
"postcss": "^8.4.31",
"postcss-preset-mantine": "1.9.0",
"@ducanh2912/next-pwa": "^10.2.6",
"@mantine/core": "7.8.0",
"@mantine/hooks": "7.8.0",
"@mantine/notifications": "^7.8.0",
"@tabler/icons-react": "^3.2.0",
"@types/node": "20.12.7",
"@types/react": "18.2.79",
"@types/react-dom": "18.2.25",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"clsx": "^2.1.0",
"eslint": "^8",
"eslint-config-next": "^14.2.2",
"eslint-config-prettier": "^9.1.0",
"next": "^14.2.2",
"postcss": "^8.4.38",
"postcss-preset-mantine": "^1.14.4",
"postcss-simple-vars": "^7.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"recharts": "^2.9.0",
"swr": "^2.2.4",
"typescript": "5.2.2",
"valtio": "^1.11.3",
"webpack": "^5.89.0"
"recharts": "^2.12.6",
"swr": "^2.2.5",
"typescript": "5.4.5",
"valtio": "^1.13.2",
"webpack": "^5.91.0"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "esnext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand Down
Loading

0 comments on commit a28f119

Please sign in to comment.