diff --git a/.eslintrc.json b/.eslintrc.json index bffb357..3bb9458 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,3 +1,47 @@ { - "extends": "next/core-web-vitals" -} + "extends": "next/core-web-vitals", + "rules": { + "no-multiple-empty-lines": [ + "error", + { + "max": 2 + } + ], + "import/no-duplicates": "error", + "import/order": [ + "error", + { + "groups": [ + [ + "builtin", + "external" + ], + "internal", + [ + "parent", + "sibling", + "index" + ] + ], + "newlines-between": "always" + } + ], + "quotes": [ + "error", + "double" + ], + "react/jsx-max-props-per-line": [ + "error", + { + "maximum": 4 + } + ], + "react/jsx-sort-props": [ + "error", + { + "ignoreCase": true + } + ], + "react/self-closing-comp": "error" + } +} \ No newline at end of file diff --git a/next.config.js b/next.config.js index a843cbe..d88ff96 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,7 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + images: { domains: ["res.cloudinary.com"] } } module.exports = nextConfig diff --git a/package-lock.json b/package-lock.json index 94db341..9381757 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,13 +11,17 @@ "@reduxjs/toolkit": "^1.9.6", "autoprefixer": "10.4.16", "axios": "^1.5.1", + "browser-image-compression": "^2.0.2", "eslint": "8.50.0", "eslint-config-next": "13.5.3", "firebase": "^10.4.0", "mongoose": "^7.5.3", "next": "13.5.3", + "nodemailer": "^6.9.5", "postcss": "8.4.31", "react": "18.2.0", + "react-copy-to-clipboard": "^5.1.0", + "react-debounce-input": "^3.3.0", "react-dom": "18.2.0", "react-icons": "^4.11.0", "react-redux": "^8.1.2", @@ -1497,6 +1501,14 @@ "node": ">=8" } }, + "node_modules/browser-image-compression": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/browser-image-compression/-/browser-image-compression-2.0.2.tgz", + "integrity": "sha512-pBLlQyUf6yB8SmmngrcOw3EoS4RpQ1BcylI3T9Yqn7+4nrQTXJD4sJDe5ODnJdrvNMaio5OicFo75rDyJD2Ucw==", + "dependencies": { + "uzip": "0.20201231.0" + } + }, "node_modules/browserslist": { "version": "4.22.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", @@ -1709,6 +1721,14 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, + "node_modules/copy-to-clipboard": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", + "integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==", + "dependencies": { + "toggle-selection": "^1.0.6" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3415,6 +3435,11 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -3754,6 +3779,14 @@ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" }, + "node_modules/nodemailer": { + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.5.tgz", + "integrity": "sha512-/dmdWo62XjumuLc5+AYQZeiRj+PRR8y8qKtFCOyuOl1k/hckZd8durUUHs/ucKx6/8kN+wFxqKJlQ/LK/qR5FA==", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4227,6 +4260,30 @@ "node": ">=0.10.0" } }, + "node_modules/react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "dependencies": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, + "node_modules/react-debounce-input": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/react-debounce-input/-/react-debounce-input-3.3.0.tgz", + "integrity": "sha512-VEqkvs8JvY/IIZvh71Z0TC+mdbxERvYF33RcebnodlsUZ8RSgyKe2VWaHXv4+/8aoOgXLxWrdsYs2hDhcwbUgA==", + "dependencies": { + "lodash.debounce": "^4", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, "node_modules/react-dom": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", @@ -4921,6 +4978,11 @@ "node": ">=8.0" } }, + "node_modules/toggle-selection": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", + "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" + }, "node_modules/tr46": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", @@ -5124,6 +5186,11 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "node_modules/uzip": { + "version": "0.20201231.0", + "resolved": "https://registry.npmjs.org/uzip/-/uzip-0.20201231.0.tgz", + "integrity": "sha512-OZeJfZP+R0z9D6TmBgLq2LHzSSptGMGDGigGiEe0pr8UBe/7fdflgHlHBNDASTXB5jnFuxHpNaJywSg8YFeGng==" + }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", @@ -6440,6 +6507,14 @@ "fill-range": "^7.0.1" } }, + "browser-image-compression": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/browser-image-compression/-/browser-image-compression-2.0.2.tgz", + "integrity": "sha512-pBLlQyUf6yB8SmmngrcOw3EoS4RpQ1BcylI3T9Yqn7+4nrQTXJD4sJDe5ODnJdrvNMaio5OicFo75rDyJD2Ucw==", + "requires": { + "uzip": "0.20201231.0" + } + }, "browserslist": { "version": "4.22.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", @@ -6573,6 +6648,14 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, + "copy-to-clipboard": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", + "integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==", + "requires": { + "toggle-selection": "^1.0.6" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -7817,6 +7900,11 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -8038,6 +8126,11 @@ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" }, + "nodemailer": { + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.5.tgz", + "integrity": "sha512-/dmdWo62XjumuLc5+AYQZeiRj+PRR8y8qKtFCOyuOl1k/hckZd8durUUHs/ucKx6/8kN+wFxqKJlQ/LK/qR5FA==" + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -8335,6 +8428,24 @@ "loose-envify": "^1.1.0" } }, + "react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "requires": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + } + }, + "react-debounce-input": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/react-debounce-input/-/react-debounce-input-3.3.0.tgz", + "integrity": "sha512-VEqkvs8JvY/IIZvh71Z0TC+mdbxERvYF33RcebnodlsUZ8RSgyKe2VWaHXv4+/8aoOgXLxWrdsYs2hDhcwbUgA==", + "requires": { + "lodash.debounce": "^4", + "prop-types": "^15.8.1" + } + }, "react-dom": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", @@ -8805,6 +8916,11 @@ "is-number": "^7.0.0" } }, + "toggle-selection": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", + "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" + }, "tr46": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", @@ -8941,6 +9057,11 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "uzip": { + "version": "0.20201231.0", + "resolved": "https://registry.npmjs.org/uzip/-/uzip-0.20201231.0.tgz", + "integrity": "sha512-OZeJfZP+R0z9D6TmBgLq2LHzSSptGMGDGigGiEe0pr8UBe/7fdflgHlHBNDASTXB5jnFuxHpNaJywSg8YFeGng==" + }, "watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", diff --git a/package.json b/package.json index 01a0be2..e92d385 100644 --- a/package.json +++ b/package.json @@ -12,13 +12,17 @@ "@reduxjs/toolkit": "^1.9.6", "autoprefixer": "10.4.16", "axios": "^1.5.1", + "browser-image-compression": "^2.0.2", "eslint": "8.50.0", "eslint-config-next": "13.5.3", "firebase": "^10.4.0", "mongoose": "^7.5.3", "next": "13.5.3", + "nodemailer": "^6.9.5", "postcss": "8.4.31", "react": "18.2.0", + "react-copy-to-clipboard": "^5.1.0", + "react-debounce-input": "^3.3.0", "react-dom": "18.2.0", "react-icons": "^4.11.0", "react-redux": "^8.1.2", diff --git a/public/favicon.ico b/public/favicon.ico index 718d6fe..21bb53c 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/images/developer.png b/public/images/developer.png new file mode 100644 index 0000000..b47663b Binary files /dev/null and b/public/images/developer.png differ diff --git a/public/images/female.png b/public/images/female.png new file mode 100644 index 0000000..3a6c37d Binary files /dev/null and b/public/images/female.png differ diff --git a/public/images/logo.png b/public/images/logo.png new file mode 100644 index 0000000..e7819db Binary files /dev/null and b/public/images/logo.png differ diff --git a/public/images/male.png b/public/images/male.png new file mode 100644 index 0000000..8273348 Binary files /dev/null and b/public/images/male.png differ diff --git a/public/images/noImage.png b/public/images/noImage.png new file mode 100644 index 0000000..c18e118 Binary files /dev/null and b/public/images/noImage.png differ diff --git a/public/images/person.png b/public/images/person.png new file mode 100644 index 0000000..1d399e9 Binary files /dev/null and b/public/images/person.png differ diff --git a/src/components/application/boxes/savedEducationBox.jsx b/src/components/application/boxes/savedEducationBox.jsx index ff3983b..c7fdde2 100644 --- a/src/components/application/boxes/savedEducationBox.jsx +++ b/src/components/application/boxes/savedEducationBox.jsx @@ -20,9 +20,13 @@ export const SavedEducationBox = ({ // Edit Education const editEducation = (i) => { - setFileInputValue(""); + if (setFileInputValue) setFileInputValue(""); setEducationArray(educationArray.filter((education, index) => index !== i)); setEducationForm(educationArray[i]); + window.scrollTo({ + top: 0, + behavior: "smooth", // Use smooth scrolling animation + }); }; // Move Up Education @@ -119,4 +123,3 @@ export const SavedEducationBox = ({ ); }; - diff --git a/src/components/application/boxes/savedExperienceBox.jsx b/src/components/application/boxes/savedExperienceBox.jsx index 98bf015..1c94a94 100644 --- a/src/components/application/boxes/savedExperienceBox.jsx +++ b/src/components/application/boxes/savedExperienceBox.jsx @@ -24,7 +24,10 @@ export const SavedExperienceBox = ({ experienceArray.filter((experience, index) => index !== i) ); setExperienceForm(experienceArray[i]); - scrollTo(0, 0); + window.scrollTo({ + top: 0, + behavior: "smooth", // Use smooth scrolling animation + }); }; // Move Up diff --git a/src/components/application/boxes/savedProjectBox.jsx b/src/components/application/boxes/savedProjectBox.jsx index 1a1a09a..3de0fde 100644 --- a/src/components/application/boxes/savedProjectBox.jsx +++ b/src/components/application/boxes/savedProjectBox.jsx @@ -20,10 +20,13 @@ export const SavedProjectBox = ({ // Edit Project const editProject = (i) => { - setFileInputValue(""); + if (setFileInputValue) setFileInputValue(""); setProjectArray(projectArray.filter((project, index) => index !== i)); setProjectForm(projectArray[i]); - scrollTo(0, 0); + window.scrollTo({ + top: 0, + behavior: "smooth", // Use smooth scrolling animation + }); }; // Move Up diff --git a/src/components/application/layout/alert/LiveAlert.jsx b/src/components/application/layout/alert/LiveAlert.jsx index 5b03b43..9c5fc04 100644 --- a/src/components/application/layout/alert/LiveAlert.jsx +++ b/src/components/application/layout/alert/LiveAlert.jsx @@ -14,7 +14,7 @@ export const LiveAlert = ({ liveAlert, userName, firstName }) => { "py-3 px-5 w-fit m-auto bg-green-600 flex items-center gap-8 rounded" } > -
diff --git a/src/components/application/layout/input/optionsData/teckStackOptions.js b/src/components/application/layout/input/optionsData/techStackOptions.js similarity index 100% rename from src/components/application/layout/input/optionsData/teckStackOptions.js rename to src/components/application/layout/input/optionsData/techStackOptions.js diff --git a/src/components/application/layout/navbar/NavbarItem.js b/src/components/application/layout/navbar/NavbarItems.js similarity index 100% rename from src/components/application/layout/navbar/NavbarItem.js rename to src/components/application/layout/navbar/NavbarItems.js diff --git a/src/components/application/profile/DeleteModal.jsx b/src/components/application/profile/DeleteModal.jsx new file mode 100644 index 0000000..f3cbca9 --- /dev/null +++ b/src/components/application/profile/DeleteModal.jsx @@ -0,0 +1,41 @@ +import React from "react"; + +const DeleteModal = ({ section, modal, setModal }) => { + return ( +
+ Are You Sure You Want to Delete {section.name.toUpperCase()} ? +
+- Are You Sure You Want to Delete {section.name.toUpperCase()} -
-{section.icon}
{section.name.toUpperCase()}
diff --git a/src/components/portfolio/pages/about/About.jsx b/src/components/portfolio/pages/about/About.jsx index bd50de3..789cd63 100644 --- a/src/components/portfolio/pages/about/About.jsx +++ b/src/components/portfolio/pages/about/About.jsx @@ -69,7 +69,7 @@ const About = () => { src={ about?.image?.imageUrl ? about.image.imageUrl - : "/images/man3.png" + : "/images/person.png" } width={350} /> diff --git a/src/components/portfolio/pages/education/Education.jsx b/src/components/portfolio/pages/education/Education.jsx index a9c276d..1548504 100644 --- a/src/components/portfolio/pages/education/Education.jsx +++ b/src/components/portfolio/pages/education/Education.jsx @@ -67,16 +67,18 @@ const Education = () => { key={education.degree} > {/* Institution Image */} -diff --git a/src/components/portfolio/pages/home/Home.jsx b/src/components/portfolio/pages/home/Home.jsx index f507f1f..9911f8a 100644 --- a/src/components/portfolio/pages/home/Home.jsx +++ b/src/components/portfolio/pages/home/Home.jsx @@ -133,8 +133,8 @@ const Home = () => { ref={profileRef} style={ home?.gender && home?.gender === "Female" - ? { backgroundImage: "url(/images/profile6.png)" } - : { backgroundImage: "url(/images/profile3.png)" } + ? { backgroundImage: "url(/images/female.png)" } + : { backgroundImage: "url(/images/male.png)" } } />