Upgrade React version to 19
This commit is contained in:
parent
01139329b5
commit
1ad2d3e152
@ -23,6 +23,7 @@
|
|||||||
<meta name="twitter:title" content="<%- metaTitle %>" />
|
<meta name="twitter:title" content="<%- metaTitle %>" />
|
||||||
<meta name="twitter:description" content="<%- metaDescription %>" />
|
<meta name="twitter:description" content="<%- metaDescription %>" />
|
||||||
<meta name="twitter:image" content="<%- metaImageURL %>" />
|
<meta name="twitter:image" content="<%- metaImageURL %>" />
|
||||||
|
<%- googleAnalyticsScript %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
128
package-lock.json
generated
128
package-lock.json
generated
@ -9,14 +9,15 @@
|
|||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^18.3.1",
|
"@dr.pogodin/react-helmet": "^3.0.2",
|
||||||
"react-dom": "^18.3.1"
|
"react": "^19.1.0",
|
||||||
|
"react-dom": "^19.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@arifszn/blog-js": "^2.0.6",
|
"@arifszn/blog-js": "^2.0.6",
|
||||||
"@tailwindcss/postcss": "^4.1.11",
|
"@tailwindcss/postcss": "^4.1.11",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^19.1.8",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^19.1.6",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||||
"@typescript-eslint/parser": "^7.3.1",
|
"@typescript-eslint/parser": "^7.3.1",
|
||||||
"@vitejs/plugin-react": "^4.4.1",
|
"@vitejs/plugin-react": "^4.4.1",
|
||||||
@ -30,7 +31,6 @@
|
|||||||
"eslint-plugin-react-refresh": "^0.4.20",
|
"eslint-plugin-react-refresh": "^0.4.20",
|
||||||
"postcss": "^8.4.38",
|
"postcss": "^8.4.38",
|
||||||
"prettier": "^3.3.2",
|
"prettier": "^3.3.2",
|
||||||
"react-helmet-async": "^2.0.5",
|
|
||||||
"react-hotjar": "^6.3.1",
|
"react-hotjar": "^6.3.1",
|
||||||
"react-icons": "^5.4.0",
|
"react-icons": "^5.4.0",
|
||||||
"tailwindcss": "^4.1.11",
|
"tailwindcss": "^4.1.11",
|
||||||
@ -1631,7 +1631,6 @@
|
|||||||
"version": "7.27.6",
|
"version": "7.27.6",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz",
|
||||||
"integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==",
|
"integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
@ -1685,6 +1684,18 @@
|
|||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@dr.pogodin/react-helmet": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@dr.pogodin/react-helmet/-/react-helmet-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-Y0O840J+TMZyq5eoJt3A/S5i7d35AiDXJ26VEg3uelvONEmMPPYoYpKmGx78tdZGVPWJ6llP/YFQRY8z8M1Kpw==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.27.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "19"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@esbuild/aix-ppc64": {
|
"node_modules/@esbuild/aix-ppc64": {
|
||||||
"version": "0.25.5",
|
"version": "0.25.5",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz",
|
||||||
@ -3119,32 +3130,24 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/prop-types": {
|
|
||||||
"version": "15.7.15",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz",
|
|
||||||
"integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@types/react": {
|
"node_modules/@types/react": {
|
||||||
"version": "18.3.23",
|
"version": "19.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.23.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.8.tgz",
|
||||||
"integrity": "sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==",
|
"integrity": "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/prop-types": "*",
|
|
||||||
"csstype": "^3.0.2"
|
"csstype": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/react-dom": {
|
"node_modules/@types/react-dom": {
|
||||||
"version": "18.3.7",
|
"version": "19.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.6.tgz",
|
||||||
"integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==",
|
"integrity": "sha512-4hOiT/dwO8Ko0gV1m/TJZYk3y0KBnY9vzDh7W+DH17b2HFSOGgdj33dhihPeuy3l0q23+4e+hoXHV6hCC4dCXw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@types/react": "^18.0.0"
|
"@types/react": "^19.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/resolve": {
|
"node_modules/@types/resolve": {
|
||||||
@ -5753,16 +5756,6 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/invariant": {
|
|
||||||
"version": "2.2.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
|
|
||||||
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"loose-envify": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/is-array-buffer": {
|
"node_modules/is-array-buffer": {
|
||||||
"version": "3.0.5",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
|
||||||
@ -6308,6 +6301,7 @@
|
|||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/js-yaml": {
|
"node_modules/js-yaml": {
|
||||||
@ -6734,18 +6728,6 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/loose-envify": {
|
|
||||||
"version": "1.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
|
||||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"loose-envify": "cli.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/lower-case": {
|
"node_modules/lower-case": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
|
||||||
@ -7404,50 +7386,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react": {
|
"node_modules/react": {
|
||||||
"version": "18.3.1",
|
"version": "19.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
|
||||||
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
|
"integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"loose-envify": "^1.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-dom": {
|
"node_modules/react-dom": {
|
||||||
"version": "18.3.1",
|
"version": "19.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz",
|
||||||
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
|
"integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0",
|
"scheduler": "^0.26.0"
|
||||||
"scheduler": "^0.23.2"
|
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^18.3.1"
|
"react": "^19.1.0"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/react-fast-compare": {
|
|
||||||
"version": "3.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz",
|
|
||||||
"integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/react-helmet-async": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-2.0.5.tgz",
|
|
||||||
"integrity": "sha512-rYUYHeus+i27MvFE+Jaa4WsyBKGkL6qVgbJvSBoX8mbsWoABJXdEO0bZyi0F6i+4f0NuIb8AvqPMj3iXFHkMwg==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"dependencies": {
|
|
||||||
"invariant": "^2.2.4",
|
|
||||||
"react-fast-compare": "^3.2.2",
|
|
||||||
"shallowequal": "^1.1.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"react": "^16.6.0 || ^17.0.0 || ^18.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-hotjar": {
|
"node_modules/react-hotjar": {
|
||||||
@ -7868,13 +7824,10 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/scheduler": {
|
"node_modules/scheduler": {
|
||||||
"version": "0.23.2",
|
"version": "0.26.0",
|
||||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
|
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz",
|
||||||
"integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
|
"integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==",
|
||||||
"license": "MIT",
|
"license": "MIT"
|
||||||
"dependencies": {
|
|
||||||
"loose-envify": "^1.1.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.7.2",
|
"version": "7.7.2",
|
||||||
@ -7948,13 +7901,6 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/shallowequal": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/shebang-command": {
|
"node_modules/shebang-command": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||||
|
|||||||
@ -22,14 +22,14 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^18.3.1",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^18.3.1"
|
"react-dom": "^19.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@arifszn/blog-js": "^2.0.6",
|
"@arifszn/blog-js": "^2.0.6",
|
||||||
"@tailwindcss/postcss": "^4.1.11",
|
"@tailwindcss/postcss": "^4.1.11",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^19.1.8",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^19.1.6",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||||
"@typescript-eslint/parser": "^7.3.1",
|
"@typescript-eslint/parser": "^7.3.1",
|
||||||
"@vitejs/plugin-react": "^4.4.1",
|
"@vitejs/plugin-react": "^4.4.1",
|
||||||
@ -43,7 +43,6 @@
|
|||||||
"eslint-plugin-react-refresh": "^0.4.20",
|
"eslint-plugin-react-refresh": "^0.4.20",
|
||||||
"postcss": "^8.4.38",
|
"postcss": "^8.4.38",
|
||||||
"prettier": "^3.3.2",
|
"prettier": "^3.3.2",
|
||||||
"react-helmet-async": "^2.0.5",
|
|
||||||
"react-hotjar": "^6.3.1",
|
"react-hotjar": "^6.3.1",
|
||||||
"react-icons": "^5.4.0",
|
"react-icons": "^5.4.0",
|
||||||
"tailwindcss": "^4.1.11",
|
"tailwindcss": "^4.1.11",
|
||||||
|
|||||||
@ -8,12 +8,10 @@ import {
|
|||||||
INVALID_GITHUB_USERNAME_ERROR,
|
INVALID_GITHUB_USERNAME_ERROR,
|
||||||
setTooManyRequestError,
|
setTooManyRequestError,
|
||||||
} from '../constants/errors';
|
} from '../constants/errors';
|
||||||
import { HelmetProvider } from 'react-helmet-async';
|
|
||||||
import '../assets/index.css';
|
import '../assets/index.css';
|
||||||
import { getInitialTheme, getSanitizedConfig, setupHotjar } from '../utils';
|
import { getInitialTheme, getSanitizedConfig, setupHotjar } from '../utils';
|
||||||
import { SanitizedConfig } from '../interfaces/sanitized-config';
|
import { SanitizedConfig } from '../interfaces/sanitized-config';
|
||||||
import ErrorPage from './error-page';
|
import ErrorPage from './error-page';
|
||||||
import HeadTagEditor from './head-tag-editor';
|
|
||||||
import { DEFAULT_THEMES } from '../constants/default-themes';
|
import { DEFAULT_THEMES } from '../constants/default-themes';
|
||||||
import ThemeChanger from './theme-changer';
|
import ThemeChanger from './theme-changer';
|
||||||
import { BG_COLOR } from '../constants';
|
import { BG_COLOR } from '../constants';
|
||||||
@ -180,123 +178,115 @@ const GitProfile = ({ config }: { config: Config }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HelmetProvider>
|
<div className="fade-in h-screen">
|
||||||
<div className="fade-in h-screen">
|
{error ? (
|
||||||
{error ? (
|
<ErrorPage
|
||||||
<ErrorPage
|
status={error.status}
|
||||||
status={error.status}
|
title={error.title}
|
||||||
title={error.title}
|
subTitle={error.subTitle}
|
||||||
subTitle={error.subTitle}
|
/>
|
||||||
/>
|
) : (
|
||||||
) : (
|
<>
|
||||||
<>
|
<div className={`p-4 lg:p-10 min-h-full ${BG_COLOR}`}>
|
||||||
<HeadTagEditor
|
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 rounded-box">
|
||||||
googleAnalyticsId={sanitizedConfig.googleAnalytics.id}
|
<div className="col-span-1">
|
||||||
appliedTheme={theme}
|
<div className="grid grid-cols-1 gap-6">
|
||||||
/>
|
{!sanitizedConfig.themeConfig.disableSwitch && (
|
||||||
<div className={`p-4 lg:p-10 min-h-full ${BG_COLOR}`}>
|
<ThemeChanger
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 rounded-box">
|
theme={theme}
|
||||||
<div className="col-span-1">
|
setTheme={setTheme}
|
||||||
<div className="grid grid-cols-1 gap-6">
|
|
||||||
{!sanitizedConfig.themeConfig.disableSwitch && (
|
|
||||||
<ThemeChanger
|
|
||||||
theme={theme}
|
|
||||||
setTheme={setTheme}
|
|
||||||
loading={loading}
|
|
||||||
themeConfig={sanitizedConfig.themeConfig}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<AvatarCard
|
|
||||||
profile={profile}
|
|
||||||
loading={loading}
|
loading={loading}
|
||||||
avatarRing={sanitizedConfig.themeConfig.displayAvatarRing}
|
themeConfig={sanitizedConfig.themeConfig}
|
||||||
resumeFileUrl={sanitizedConfig.resume.fileUrl}
|
|
||||||
/>
|
/>
|
||||||
<DetailsCard
|
)}
|
||||||
profile={profile}
|
<AvatarCard
|
||||||
|
profile={profile}
|
||||||
|
loading={loading}
|
||||||
|
avatarRing={sanitizedConfig.themeConfig.displayAvatarRing}
|
||||||
|
resumeFileUrl={sanitizedConfig.resume.fileUrl}
|
||||||
|
/>
|
||||||
|
<DetailsCard
|
||||||
|
profile={profile}
|
||||||
|
loading={loading}
|
||||||
|
github={sanitizedConfig.github}
|
||||||
|
social={sanitizedConfig.social}
|
||||||
|
/>
|
||||||
|
{sanitizedConfig.skills.length !== 0 && (
|
||||||
|
<SkillCard
|
||||||
loading={loading}
|
loading={loading}
|
||||||
github={sanitizedConfig.github}
|
skills={sanitizedConfig.skills}
|
||||||
social={sanitizedConfig.social}
|
|
||||||
/>
|
/>
|
||||||
{sanitizedConfig.skills.length !== 0 && (
|
)}
|
||||||
<SkillCard
|
{sanitizedConfig.experiences.length !== 0 && (
|
||||||
loading={loading}
|
<ExperienceCard
|
||||||
skills={sanitizedConfig.skills}
|
loading={loading}
|
||||||
/>
|
experiences={sanitizedConfig.experiences}
|
||||||
)}
|
/>
|
||||||
{sanitizedConfig.experiences.length !== 0 && (
|
)}
|
||||||
<ExperienceCard
|
{sanitizedConfig.certifications.length !== 0 && (
|
||||||
loading={loading}
|
<CertificationCard
|
||||||
experiences={sanitizedConfig.experiences}
|
loading={loading}
|
||||||
/>
|
certifications={sanitizedConfig.certifications}
|
||||||
)}
|
/>
|
||||||
{sanitizedConfig.certifications.length !== 0 && (
|
)}
|
||||||
<CertificationCard
|
{sanitizedConfig.educations.length !== 0 && (
|
||||||
loading={loading}
|
<EducationCard
|
||||||
certifications={sanitizedConfig.certifications}
|
loading={loading}
|
||||||
/>
|
educations={sanitizedConfig.educations}
|
||||||
)}
|
/>
|
||||||
{sanitizedConfig.educations.length !== 0 && (
|
)}
|
||||||
<EducationCard
|
|
||||||
loading={loading}
|
|
||||||
educations={sanitizedConfig.educations}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="lg:col-span-2 col-span-1">
|
</div>
|
||||||
<div className="grid grid-cols-1 gap-6">
|
<div className="lg:col-span-2 col-span-1">
|
||||||
{sanitizedConfig.projects.github.display && (
|
<div className="grid grid-cols-1 gap-6">
|
||||||
<GithubProjectCard
|
{sanitizedConfig.projects.github.display && (
|
||||||
header={sanitizedConfig.projects.github.header}
|
<GithubProjectCard
|
||||||
limit={sanitizedConfig.projects.github.automatic.limit}
|
header={sanitizedConfig.projects.github.header}
|
||||||
githubProjects={githubProjects}
|
limit={sanitizedConfig.projects.github.automatic.limit}
|
||||||
loading={loading}
|
githubProjects={githubProjects}
|
||||||
username={sanitizedConfig.github.username}
|
loading={loading}
|
||||||
googleAnalyticsId={sanitizedConfig.googleAnalytics.id}
|
googleAnalyticsId={sanitizedConfig.googleAnalytics.id}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{sanitizedConfig.publications.length !== 0 && (
|
{sanitizedConfig.publications.length !== 0 && (
|
||||||
<PublicationCard
|
<PublicationCard
|
||||||
loading={loading}
|
loading={loading}
|
||||||
publications={sanitizedConfig.publications}
|
publications={sanitizedConfig.publications}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{sanitizedConfig.projects.external.projects.length !==
|
{sanitizedConfig.projects.external.projects.length !== 0 && (
|
||||||
0 && (
|
<ExternalProjectCard
|
||||||
<ExternalProjectCard
|
loading={loading}
|
||||||
loading={loading}
|
header={sanitizedConfig.projects.external.header}
|
||||||
header={sanitizedConfig.projects.external.header}
|
externalProjects={
|
||||||
externalProjects={
|
sanitizedConfig.projects.external.projects
|
||||||
sanitizedConfig.projects.external.projects
|
}
|
||||||
}
|
googleAnalyticId={sanitizedConfig.googleAnalytics.id}
|
||||||
googleAnalyticId={sanitizedConfig.googleAnalytics.id}
|
/>
|
||||||
/>
|
)}
|
||||||
)}
|
{sanitizedConfig.blog.display && (
|
||||||
{sanitizedConfig.blog.display && (
|
<BlogCard
|
||||||
<BlogCard
|
loading={loading}
|
||||||
loading={loading}
|
googleAnalyticsId={sanitizedConfig.googleAnalytics.id}
|
||||||
googleAnalyticsId={sanitizedConfig.googleAnalytics.id}
|
blog={sanitizedConfig.blog}
|
||||||
blog={sanitizedConfig.blog}
|
/>
|
||||||
/>
|
)}
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{sanitizedConfig.footer && (
|
</div>
|
||||||
<footer
|
{sanitizedConfig.footer && (
|
||||||
className={`p-4 footer ${BG_COLOR} text-base-content footer-center`}
|
<footer
|
||||||
>
|
className={`p-4 footer ${BG_COLOR} text-base-content footer-center`}
|
||||||
<div className="card card-sm bg-base-100 shadow-sm">
|
>
|
||||||
<Footer content={sanitizedConfig.footer} loading={loading} />
|
<div className="card card-sm bg-base-100 shadow-sm">
|
||||||
</div>
|
<Footer content={sanitizedConfig.footer} loading={loading} />
|
||||||
</footer>
|
</div>
|
||||||
)}
|
</footer>
|
||||||
</>
|
)}
|
||||||
)}
|
</>
|
||||||
</div>
|
)}
|
||||||
</HelmetProvider>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,47 +0,0 @@
|
|||||||
import { Helmet } from 'react-helmet-async';
|
|
||||||
import { isDarkishTheme } from '../../utils';
|
|
||||||
|
|
||||||
type HeadTagEditorProps = {
|
|
||||||
googleAnalyticsId?: string;
|
|
||||||
appliedTheme: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Renders the head tag editor component.
|
|
||||||
*
|
|
||||||
* @param {HeadTagEditorProps} googleAnalyticsId - The Google Analytics ID.
|
|
||||||
* @param {HeadTagEditorProps} appliedTheme - The applied theme.
|
|
||||||
* @return {React.ReactElement} The head tag editor component.
|
|
||||||
*/
|
|
||||||
const HeadTagEditor: React.FC<HeadTagEditorProps> = ({
|
|
||||||
googleAnalyticsId,
|
|
||||||
appliedTheme,
|
|
||||||
}) => {
|
|
||||||
return (
|
|
||||||
<Helmet>
|
|
||||||
<meta
|
|
||||||
name="theme-color"
|
|
||||||
content={isDarkishTheme(appliedTheme) ? '#000000' : '#ffffff'}
|
|
||||||
/>
|
|
||||||
{googleAnalyticsId && (
|
|
||||||
<>
|
|
||||||
<script
|
|
||||||
async
|
|
||||||
src={`https://www.googletagmanager.com/gtag/js?id=${googleAnalyticsId}`}
|
|
||||||
></script>
|
|
||||||
<script>
|
|
||||||
{`window.dataLayer = window.dataLayer || [];
|
|
||||||
function gtag() {
|
|
||||||
dataLayer.push(arguments);
|
|
||||||
}
|
|
||||||
gtag('js', new Date());
|
|
||||||
gtag('config', '${googleAnalyticsId}');
|
|
||||||
`}
|
|
||||||
</script>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Helmet>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default HeadTagEditor;
|
|
||||||
@ -15,6 +15,16 @@ export default defineConfig({
|
|||||||
metaTitle: CONFIG.seo.title,
|
metaTitle: CONFIG.seo.title,
|
||||||
metaDescription: CONFIG.seo.description,
|
metaDescription: CONFIG.seo.description,
|
||||||
metaImageURL: CONFIG.seo.imageURL,
|
metaImageURL: CONFIG.seo.imageURL,
|
||||||
|
googleAnalyticsScript: CONFIG.googleAnalytics.id
|
||||||
|
? `<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=${CONFIG.googleAnalytics.id}"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
gtag('config', '${CONFIG.googleAnalytics.id}');
|
||||||
|
</script>`
|
||||||
|
: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user