Skip to content

Commit 5606f2f

Browse files
authored
Merge pull request github#26123 from github/enterprise-support-link
Update Enterprise Support Contact Link
2 parents 6f04f42 + 120815d commit 5606f2f

File tree

4 files changed

+6
-36
lines changed

4 files changed

+6
-36
lines changed

components/GenericError.tsx

+1-8
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ import Link from 'next/link'
33
import { useRouter } from 'next/router'
44

55
import { MarkGithubIcon, CommentDiscussionIcon } from '@primer/octicons-react'
6-
import { useVersion } from 'components/hooks/useVersion'
76
import { Lead } from 'components/ui/Lead'
87

98
export function GenericError() {
10-
const { isEnterprise } = useVersion()
11-
129
return (
1310
<div className="min-h-screen d-flex flex-column">
1411
<Head>
@@ -28,11 +25,7 @@ export function GenericError() {
2825
</p>
2926
<a
3027
id="contact-us"
31-
href={
32-
isEnterprise
33-
? 'https://enterprise.github.com/support'
34-
: 'https://support.github.com/contact'
35-
}
28+
href="https://support.github.com/contact"
3629
className="btn btn-outline mt-2"
3730
>
3831
<CommentDiscussionIcon size="small" className="octicon mr-1" />

components/page-footer/Support.tsx

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { PeopleIcon, CommentDiscussionIcon } from '@primer/octicons-react'
22

33
import { useTranslation } from 'components/hooks/useTranslation'
4-
import { useVersion } from 'components/hooks/useVersion'
54
import { useMainContext } from 'components/context/MainContext'
65

76
export const Support = () => {
8-
const { isEnterprise } = useVersion()
97
const { t } = useTranslation('support')
108
const { communityRedirect } = useMainContext()
119

@@ -25,11 +23,7 @@ export const Support = () => {
2523
<div>
2624
<a
2725
id="contact-us"
28-
href={
29-
isEnterprise
30-
? 'https://enterprise.github.com/support'
31-
: 'https://support.github.com/contact'
32-
}
26+
href="https://support.github.com/contact"
3327
className="Link—secondary text-bold"
3428
>
3529
<CommentDiscussionIcon size="small" className="octicon mr-1" />

pages/404.tsx

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { SimpleHeader, SimpleFooter } from 'components/GenericError'
22
import Head from 'next/head'
33
import { CommentDiscussionIcon } from '@primer/octicons-react'
4-
import { useVersion } from 'components/hooks/useVersion'
54
import { Lead } from 'components/ui/Lead'
65

76
const Custom404 = () => {
8-
const { isEnterprise } = useVersion()
97
return (
108
<div className="min-h-screen d-flex flex-column">
119
<Head>
@@ -25,11 +23,7 @@ const Custom404 = () => {
2523
</p>
2624
<a
2725
id="contact-us"
28-
href={
29-
isEnterprise
30-
? 'https://enterprise.github.com/support'
31-
: 'https://support.github.com/contact'
32-
}
26+
href="https://support.github.com/contact"
3327
className="btn btn-outline mt-2"
3428
>
3529
<CommentDiscussionIcon size="small" className="octicon mr-1" />

tests/rendering/footer.js

+3-14
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,24 @@
11
import { getDOM } from '../helpers/supertest.js'
2-
import enterpriseServerReleases from '../../lib/enterprise-server-releases.js'
32
import nonEnterpriseDefaultVersion from '../../lib/non-enterprise-default-version.js'
43
import { jest } from '@jest/globals'
54

65
describe('footer', () => {
76
jest.setTimeout(10 * 60 * 1000)
87

98
describe('"contact us" link', () => {
10-
test('leads to dotcom support on dotcom pages', async () => {
9+
test('leads to support from articles', async () => {
1110
const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/github`)
1211
expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact')
1312
})
1413

15-
test('leads to Enterprise support on Enterprise pages', async () => {
16-
const $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.latest}`)
17-
expect($('a#contact-us').attr('href')).toBe('https://enterprise.github.com/support')
18-
})
19-
20-
test('leads to Enterprise support on GHEC pages', async () => {
21-
const $ = await getDOM('/en/enterprise-cloud@latest')
22-
expect($('a#contact-us').attr('href')).toBe('https://enterprise.github.com/support')
23-
})
24-
25-
test('leads to dotcom support on 404 pages', async () => {
14+
test('leads to support on 404 pages', async () => {
2615
const $ = await getDOM('/delicious-snacks/donuts.php', { allow404: true })
2716
expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact')
2817
})
2918
})
3019

3120
describe('"contact us" link with nextjs', () => {
32-
test('leads to dotcom support on dotcom pages', async () => {
21+
test('leads to support from articles', async () => {
3322
const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/github?nextjs=`)
3423
expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact')
3524
})

0 commit comments

Comments
 (0)