chore: update dependencies and devDependencies in package.json
fix: add IconProp type for FontAwesome icons in Header and Paginator components refactor: change string quotes from double to single in Paginator component fix: update tsconfig.json to use react-jsx and include additional type definitions
This commit is contained in:
1391
package-lock.json
generated
1391
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
36
package.json
36
package.json
@@ -9,34 +9,34 @@
|
||||
"lint": "eslint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/free-brands-svg-icons": "^7.0.1",
|
||||
"@fortawesome/free-regular-svg-icons": "^7.0.1",
|
||||
"@fortawesome/free-solid-svg-icons": "^7.0.1",
|
||||
"@fortawesome/react-fontawesome": "^3.0.2",
|
||||
"bcryptjs": "^3.0.2",
|
||||
"@fortawesome/free-brands-svg-icons": "^7.1.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^7.1.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
||||
"@fortawesome/react-fontawesome": "^3.1.1",
|
||||
"bcryptjs": "^3.0.3",
|
||||
"iron-session": "^8.0.4",
|
||||
"next": "^15.5.4",
|
||||
"react": "19.1.0",
|
||||
"react-dom": "19.1.0",
|
||||
"next": "^16.1.1",
|
||||
"react": "19.2.3",
|
||||
"react-dom": "19.2.3",
|
||||
"react-google-recaptcha": "^3.1.0",
|
||||
"sass": "^1.91.0",
|
||||
"uuid": "^11.1.0",
|
||||
"zod": "^4.1.5"
|
||||
"sass": "^1.97.1",
|
||||
"uuid": "^13.0.0",
|
||||
"zod": "^4.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3",
|
||||
"@types/node": "^20",
|
||||
"@types/node": "^25",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"@types/react-google-recaptcha": "^2.1.9",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.45.0",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint-config-next": "15.5.2",
|
||||
"@types/uuid": "^11.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
||||
"@typescript-eslint/parser": "^8.50.1",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-config-next": "16.1.1",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier": "^3.7.4",
|
||||
"prettier-eslint": "^16.4.2",
|
||||
"typescript": "^5"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import logo from '@/assets/logo_text.png';
|
||||
import { deleteSessionCookie } from '@/lib/actions';
|
||||
import styles from '@/styles/Header.module.scss';
|
||||
import type { IconProp } from '@fortawesome/fontawesome-svg-core';
|
||||
import { faInstagram } from '@fortawesome/free-brands-svg-icons';
|
||||
import { faEnvelope } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
@@ -74,11 +75,11 @@ export default function Header() {
|
||||
)}
|
||||
<div className={styles.navSocials}>
|
||||
<Link className={styles.navLink} href="https://www.instagram.com/f1r3wave" target="_blank">
|
||||
<FontAwesomeIcon icon={faInstagram} />
|
||||
<FontAwesomeIcon icon={faInstagram as IconProp} />
|
||||
</Link>
|
||||
|
||||
<Link className={styles.navLink} href="mailto:eric@f1r3wave.photos" target="_blank">
|
||||
<FontAwesomeIcon icon={faEnvelope} />
|
||||
<FontAwesomeIcon icon={faEnvelope as IconProp} />
|
||||
</Link>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
"use client";
|
||||
'use client';
|
||||
|
||||
import styles from "@/styles/Paginator.module.scss";
|
||||
import { PaginatorPosition } from "@/interfaces/paginator";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faArrowLeft, faArrowRight } from "@fortawesome/free-solid-svg-icons";
|
||||
import { PaginatorPosition } from '@/interfaces/paginator';
|
||||
import styles from '@/styles/Paginator.module.scss';
|
||||
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
||||
import { faArrowLeft, faArrowRight } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
interface PaginatorProps {
|
||||
page: number;
|
||||
@@ -17,27 +18,28 @@ export default function Paginator({ page, totalPages, position }: PaginatorProps
|
||||
if (totalPages <= 1) return null;
|
||||
|
||||
const setPage = (newPage: number) => {
|
||||
const pathParts = window.location.pathname.split("/");
|
||||
const pathParts = window.location.pathname.split('/');
|
||||
pathParts[pathParts.length - 1] = newPage.toString();
|
||||
const newPath = pathParts.join("/");
|
||||
const newPath = pathParts.join('/');
|
||||
|
||||
router.push(newPath);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`${styles.paginator} ${position === PaginatorPosition.TOP ? styles.paginatorTop : position === PaginatorPosition.BOTTOM ? styles.paginatorBottom : ""}`}>
|
||||
<div
|
||||
className={`${styles.paginator} ${position === PaginatorPosition.TOP ? styles.paginatorTop : position === PaginatorPosition.BOTTOM ? styles.paginatorBottom : ''}`}>
|
||||
<button disabled={page === 1} onClick={() => setPage(page - 1)}>
|
||||
<FontAwesomeIcon icon={faArrowLeft} />
|
||||
<FontAwesomeIcon icon={faArrowLeft as IconProp} />
|
||||
</button>
|
||||
|
||||
{Array.from({ length: totalPages }, (_, index) => (
|
||||
<button key={index + 1} className={+page === index + 1 ? styles.active : ""} onClick={() => setPage(index + 1)}>
|
||||
<button key={index + 1} className={+page === index + 1 ? styles.active : ''} onClick={() => setPage(index + 1)}>
|
||||
{index + 1}
|
||||
</button>
|
||||
))}
|
||||
|
||||
<button disabled={page === totalPages} onClick={() => setPage(+page + 1)}>
|
||||
<FontAwesomeIcon icon={faArrowRight} />
|
||||
<FontAwesomeIcon icon={faArrowRight as IconProp} />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"jsx": "react-jsx",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
@@ -22,6 +22,12 @@
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts",
|
||||
".next/dev/types/**/*.ts"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user