diff --git a/lib/getArticleRedirects.ts b/lib/getArticleRedirects.ts deleted file mode 100644 index ae117b5..0000000 --- a/lib/getArticleRedirects.ts +++ /dev/null @@ -1,63 +0,0 @@ -const oldSlugs = [ - 'table-of-contents', - 'why-study-management', - 'what-is-a-project', - 'project-artifacts-and-their-importance', - 'project-management-environment', - 'philosophies-methodologies-and-frameworks', - 'software-development-life-cycles', - 'scrum-framework-artifacts-rituals-and-roles', - 'project-approval-and-further-workflow', - 'all-about-user-stories', - 'technical-components-of-the-project', - 'client-dev-company-workflow-birds-eye-view', - 'career-path-of-a-manager-and-a-few-universal-tips', - 'uxscience', - 'uxcgstory', - 'uxeducation', - 'overengineering_and_demo_readiness', - 'uxcgdiy', - 'uiux', - 'awareness-test', -]; - -export const getArticleRedirects = async ( - locale: string, -): Promise> => { - const url = `${process.env.NEXT_PUBLIC_STRAPI}/api/articles?locale=${locale}&pagination[pageSize]=100`; - - try { - const response = await fetch(url); - - if (!response.ok) { - throw new Error(`Failed to fetch Strapi articles (${response.status})`); - } - - const json = await response.json(); - const articles = json?.data || []; - - const map: Record = {}; - - articles.forEach(article => { - const { url: oldUrl, newUrl } = article.attributes || {}; - - const oldSlug = oldUrl - ?.replace(/^\/+/, '') - .replace(/\/+$/, '') - ?.toLowerCase(); - const newSlug = newUrl - ?.replace(/^\/+/, '') - .replace(/\/+$/, '') - ?.toLowerCase(); - - if (oldSlug && newSlug && oldSlugs.includes(oldSlug)) { - map[oldSlug] = `articles/${newSlug}`; - } - }); - - return map; - } catch (err: any) { - console.error('❌ Redirect error:', err.message || err); - return {}; - } -}; diff --git a/package.json b/package.json index cab4982..f7a170d 100644 --- a/package.json +++ b/package.json @@ -43,11 +43,11 @@ "next-auth": "4.23.2", "nodemailer": "^6.10.0", "prettier": "^3.6.2", - "react": "19.0.1", + "react": "19.0.3", "react-beautiful-dnd": "13.1.1", "react-confetti": "6.1.0", "react-confetti-explosion": "2.1.2", - "react-dom": "19.0.1", + "react-dom": "19.0.3", "react-ga4": "1.4.1", "react-icalendar-link": "3.0.2", "react-intersection-observer": "^9.16.0", diff --git a/src/components/NPS/NPS.module.scss b/src/components/NPS/NPS.module.scss index 7ec38ae..12de9e7 100644 --- a/src/components/NPS/NPS.module.scss +++ b/src/components/NPS/NPS.module.scss @@ -5,7 +5,8 @@ .nps { position: fixed; bottom: 23px; - background-color: #ffffff; + background-color: #fafafa; + border: 1px solid #c4c4c4; left: 50%; border-radius: 4px; padding: 14px 39px 12px 0; diff --git a/src/data/toolHeader/en.ts b/src/data/toolHeader/en.ts index 9e387b6..bc90a7d 100644 --- a/src/data/toolHeader/en.ts +++ b/src/data/toolHeader/en.ts @@ -14,7 +14,7 @@ const en = { items: [ { title: 'Cognitive biases in education', - link: '/uxeducation', + link: '/articles/uxeducation', }, ], }, diff --git a/src/data/toolHeader/hy.ts b/src/data/toolHeader/hy.ts index 951644f..2227813 100644 --- a/src/data/toolHeader/hy.ts +++ b/src/data/toolHeader/hy.ts @@ -14,7 +14,7 @@ const hy = { items: [ { title: 'Կոգնիտիվ հակումները կրթության մեջ', - link: '/uxeducation', + link: '/articles/uxeducation', }, ], }, diff --git a/src/data/toolHeader/ru.ts b/src/data/toolHeader/ru.ts index 5060ee3..0f34cd0 100644 --- a/src/data/toolHeader/ru.ts +++ b/src/data/toolHeader/ru.ts @@ -14,7 +14,7 @@ const ru = { items: [ { title: 'Использование проекта в образовательной системе', - link: '/ru/uxeducation', + link: '/ru/articles/uxeducation', }, ], }, diff --git a/yarn.lock b/yarn.lock index af043bb..69037b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5528,10 +5528,10 @@ react-display-name@^0.2.4: resolved "https://registry.yarnpkg.com/react-display-name/-/react-display-name-0.2.5.tgz#304c7cbfb59ee40389d436e1a822c17fe27936c6" integrity sha512-I+vcaK9t4+kypiSgaiVWAipqHRXYmZIuAiS8vzFvXHHXVigg/sMKwlRgLy6LH2i3rmP+0Vzfl5lFsFRwF1r3pg== -react-dom@19.0.1: - version "19.0.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.1.tgz#b856cbfe38e002b485803d5a0692ee600832edbd" - integrity sha512-3TJg51HSbJiLVYCS6vWwWsyqoS36aGEOCmtLLHxROlSZZ5Bk10xpxHFbrCu4DdqgR85DDc9Vucxqhai3g2xjtA== +react-dom@19.0.3: + version "19.0.3" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.3.tgz#517de15717f686dd6e39488434b6dd18f01ef1fb" + integrity sha512-a7ezLfxibhu6fZBVLwy6WEd3Jn/4H8JYVO8K8GtBfRf1Pl+ox7KFoMCzAGlxLZUXo0t44YZShzhhoDH3yMVdxQ== dependencies: scheduler "^0.25.0" @@ -5701,10 +5701,10 @@ react-use@*: ts-easing "^0.2.0" tslib "^2.1.0" -react@19.0.1: - version "19.0.1" - resolved "https://registry.yarnpkg.com/react/-/react-19.0.1.tgz#0fb9523201af5f8c7aee753a825d1d9d2f9769db" - integrity sha512-nVRaZCuEyvu69sWrkdwjP6QY57C+lY+uMNNMyWUFJb9Z/JlaBOQus7mSMfGYsblv7R691u6SSJA/dX9IRnyyLQ== +react@19.0.3: + version "19.0.3" + resolved "https://registry.yarnpkg.com/react/-/react-19.0.3.tgz#dc803a2316a97d8a1619bf460353c8ccdb7d3a60" + integrity sha512-owzQanTgpB8GF7pVL6mUwZZyhKzFePi9++GkFk54i9PRU0jq+z7v9Mwg7PAZJYCiYl5YwcyQGGq5/PLkesd8nw== readdirp@~3.6.0: version "3.6.0"