From 1ba55397c8de6ec9a0e0a71c5c2223412455b1b0 Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Fri, 11 Mar 2022 20:45:46 +0000 Subject: [PATCH 1/9] update enterprise contact link --- components/GenericError.tsx | 9 +-------- components/page-footer/Support.tsx | 8 +------- pages/404.tsx | 8 +------- tests/rendering/footer.js | 4 ++-- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/components/GenericError.tsx b/components/GenericError.tsx index 88cd4ee203..c3f5b4dff7 100644 --- a/components/GenericError.tsx +++ b/components/GenericError.tsx @@ -3,12 +3,9 @@ import Link from 'next/link' import { useRouter } from 'next/router' import { MarkGithubIcon, CommentDiscussionIcon } from '@primer/octicons-react' -import { useVersion } from 'components/hooks/useVersion' import { Lead } from 'components/ui/Lead' export function GenericError() { - const { isEnterprise } = useVersion() - return (
@@ -28,11 +25,7 @@ export function GenericError() {

diff --git a/components/page-footer/Support.tsx b/components/page-footer/Support.tsx index 9613ad6f4a..75876eba60 100644 --- a/components/page-footer/Support.tsx +++ b/components/page-footer/Support.tsx @@ -1,11 +1,9 @@ import { PeopleIcon, CommentDiscussionIcon } from '@primer/octicons-react' import { useTranslation } from 'components/hooks/useTranslation' -import { useVersion } from 'components/hooks/useVersion' import { useMainContext } from 'components/context/MainContext' export const Support = () => { - const { isEnterprise } = useVersion() const { t } = useTranslation('support') const { communityRedirect } = useMainContext() @@ -25,11 +23,7 @@ export const Support = () => {
diff --git a/pages/404.tsx b/pages/404.tsx index bb555a7198..aea3d11ac8 100644 --- a/pages/404.tsx +++ b/pages/404.tsx @@ -1,11 +1,9 @@ import { SimpleHeader, SimpleFooter } from 'components/GenericError' import Head from 'next/head' import { CommentDiscussionIcon } from '@primer/octicons-react' -import { useVersion } from 'components/hooks/useVersion' import { Lead } from 'components/ui/Lead' const Custom404 = () => { - const { isEnterprise } = useVersion() return (
@@ -25,11 +23,7 @@ const Custom404 = () => {

diff --git a/tests/rendering/footer.js b/tests/rendering/footer.js index 46f5af6525..5504a378b8 100644 --- a/tests/rendering/footer.js +++ b/tests/rendering/footer.js @@ -14,12 +14,12 @@ describe('footer', () => { test('leads to Enterprise support on Enterprise pages', async () => { const $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.latest}`) - expect($('a#contact-us').attr('href')).toBe('https://enterprise.github.com/support') + expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact') }) test('leads to Enterprise support on GHEC pages', async () => { const $ = await getDOM('/en/enterprise-cloud@latest') - expect($('a#contact-us').attr('href')).toBe('https://enterprise.github.com/support') + expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact') }) test('leads to dotcom support on 404 pages', async () => { From f69a72a718cf66f92a5a6edb8e6dd229b660b17a Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Mon, 14 Mar 2022 07:55:28 -0700 Subject: [PATCH 2/9] Update components/GenericError.tsx Co-authored-by: Peter Bengtsson --- components/GenericError.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/GenericError.tsx b/components/GenericError.tsx index c3f5b4dff7..a10583d508 100644 --- a/components/GenericError.tsx +++ b/components/GenericError.tsx @@ -25,7 +25,7 @@ export function GenericError() {

From 2de792f3ae3f6b13d2bed3bd6d628952ccf209bb Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Mon, 14 Mar 2022 07:55:37 -0700 Subject: [PATCH 3/9] Update components/page-footer/Support.tsx Co-authored-by: Peter Bengtsson --- components/page-footer/Support.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/page-footer/Support.tsx b/components/page-footer/Support.tsx index 75876eba60..5e84238574 100644 --- a/components/page-footer/Support.tsx +++ b/components/page-footer/Support.tsx @@ -23,7 +23,7 @@ export const Support = () => {
From f57a9801c395b25b9c69f394be2ff89d900f246b Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Mon, 14 Mar 2022 07:55:48 -0700 Subject: [PATCH 4/9] Update pages/404.tsx Co-authored-by: Peter Bengtsson --- pages/404.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/404.tsx b/pages/404.tsx index aea3d11ac8..496e4b9ae3 100644 --- a/pages/404.tsx +++ b/pages/404.tsx @@ -23,7 +23,7 @@ const Custom404 = () => {

From 2fe134919e775259ad8a191f60ea8abd589c4a72 Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Mon, 14 Mar 2022 08:25:48 -0700 Subject: [PATCH 5/9] Update GenericError.tsx Making the linter happy --- components/GenericError.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/GenericError.tsx b/components/GenericError.tsx index a10583d508..24bbdf86a3 100644 --- a/components/GenericError.tsx +++ b/components/GenericError.tsx @@ -25,7 +25,7 @@ export function GenericError() {

From 0f2f23799aec423136a83960a2e81fb9bec13401 Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Mon, 14 Mar 2022 08:31:43 -0700 Subject: [PATCH 6/9] Update 404.tsx making the linter happy --- pages/404.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/404.tsx b/pages/404.tsx index 496e4b9ae3..db0d2c5b1f 100644 --- a/pages/404.tsx +++ b/pages/404.tsx @@ -23,7 +23,7 @@ const Custom404 = () => {

From cbc92f1956843ae97b6e5027848e3512d014466c Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Mon, 14 Mar 2022 08:32:20 -0700 Subject: [PATCH 7/9] Update Support.tsx making the linter happy --- components/page-footer/Support.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/page-footer/Support.tsx b/components/page-footer/Support.tsx index 5e84238574..a09d6bbaca 100644 --- a/components/page-footer/Support.tsx +++ b/components/page-footer/Support.tsx @@ -23,7 +23,7 @@ export const Support = () => {
From ea49b45ec4922d26b24f39e002ae7acb492c515a Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Mon, 14 Mar 2022 08:59:29 -0700 Subject: [PATCH 8/9] Update footer.js removed unnecessary tests --- tests/rendering/footer.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/tests/rendering/footer.js b/tests/rendering/footer.js index 5504a378b8..bb68476a89 100644 --- a/tests/rendering/footer.js +++ b/tests/rendering/footer.js @@ -7,22 +7,12 @@ describe('footer', () => { jest.setTimeout(10 * 60 * 1000) describe('"contact us" link', () => { - test('leads to dotcom support on dotcom pages', async () => { + test('leads to support and articles', async () => { const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/github`) expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact') }) - test('leads to Enterprise support on Enterprise pages', async () => { - const $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.latest}`) - expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact') - }) - - test('leads to Enterprise support on GHEC pages', async () => { - const $ = await getDOM('/en/enterprise-cloud@latest') - expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact') - }) - - test('leads to dotcom support on 404 pages', async () => { + test('leads to support on 404 pages', async () => { const $ = await getDOM('/delicious-snacks/donuts.php', { allow404: true }) expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact') }) From bb23efed69f01720960521d63659180df18019a0 Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Mon, 14 Mar 2022 09:08:43 -0700 Subject: [PATCH 9/9] Update footer.js --- tests/rendering/footer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/rendering/footer.js b/tests/rendering/footer.js index bb68476a89..ff06162b2c 100644 --- a/tests/rendering/footer.js +++ b/tests/rendering/footer.js @@ -1,5 +1,4 @@ import { getDOM } from '../helpers/supertest.js' -import enterpriseServerReleases from '../../lib/enterprise-server-releases.js' import nonEnterpriseDefaultVersion from '../../lib/non-enterprise-default-version.js' import { jest } from '@jest/globals' @@ -7,7 +6,7 @@ describe('footer', () => { jest.setTimeout(10 * 60 * 1000) describe('"contact us" link', () => { - test('leads to support and articles', async () => { + test('leads to support from articles', async () => { const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/github`) expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact') }) @@ -19,7 +18,7 @@ describe('footer', () => { }) describe('"contact us" link with nextjs', () => { - test('leads to dotcom support on dotcom pages', async () => { + test('leads to support from articles', async () => { const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/github?nextjs=`) expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact') })