Skip to content

Commit 42e54f4

Browse files
authored
Merge pull request #1106 from ensdomains/feature/fet-2893-update-manager-v3-support-links
Update support links and fix external URL handling in navigation
2 parents 9cea902 + b28b203 commit 42e54f4

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

public/locales/en/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"favourites": "Favourites",
7878
"settings": "Settings",
7979
"governance": "Governance",
80-
"community": "Community",
80+
"blog": "Blog",
8181
"developers": "Developers",
8282
"support": "Support",
8383
"bounty": "Bug Bounty",

src/components/@atoms/BaseLink.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ import { createUrlObject } from '@app/utils/urlObject'
88

99
// from: https://github.com/Velenir/nextjs-ipfs-example
1010

11+
const isExternalUrl = (url: string | LinkProps['href']): boolean =>
12+
typeof url === 'string' && (url.startsWith('http://') || url.startsWith('https://'))
13+
1114
const BaseLink = ({ href, ...rest }: PropsWithChildren<LinkProps>) => {
1215
const router = useRouter()
1316
const referrer = router.query.referrer as string | undefined
1417

1518
const newHref = useMemo(() => {
19+
if (isExternalUrl(href)) return href as string
1620
const urlObject = createUrlObject(href, referrer ? { referrer } : undefined)
1721
return getDestination(urlObject)
1822
}, [href, referrer])
@@ -27,13 +31,18 @@ export const BaseLinkWithHistory = ({
2731
const router = useRouter()
2832

2933
const newHref = useMemo(() => {
34+
if (isExternalUrl(href)) return href
3035
const urlObject = createUrlObject(href, {
3136
from: router.asPath,
3237
referrer: router.query.referrer as string | undefined,
3338
})
3439
return getDestination(urlObject)
3540
}, [href, router.asPath, router.query.referrer])
3641

42+
if (isExternalUrl(href)) {
43+
return <Link {...rest} legacyBehavior href={href} />
44+
}
45+
3746
return <Link {...rest} legacyBehavior href={newHref} as={createDecorativeUrlObject(newHref)} />
3847
}
3948

src/components/@molecules/TransactionDialogManager/stage/TransactionStageModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export const LoadBar = ({ status, sendTime }: { status: Status; sendTime: number
220220
<Outlink
221221
iconPosition="before"
222222
icon={QuestionCircleSVG}
223-
href="https://support.ens.domains/en/articles/7982906-long-running-transactions"
223+
href="https://support.ens.domains/en/articles/13608541-transaction-troubleshooting"
224224
>
225225
{t('transaction.dialog.sent.learn')}
226226
</Outlink>

src/routes.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
export type PublicRoute =
1717
| 'search'
1818
| 'governance'
19-
| 'community'
19+
| 'blog'
2020
| 'developers'
2121
| 'support'
2222
| 'bounty'
@@ -108,7 +108,7 @@ export const routes: RouteItemObj[] = [
108108
},
109109
{
110110
name: 'feedback',
111-
href: 'https://docs.google.com/forms/d/e/1FAIpQLSfDzIszteoaqiayxUCpFLK1AgigoASHIPcsxFg8PZoS6R6Uzw/viewform?usp=sf_link',
111+
href: 'https://enslabs.notion.site/20d7a8b1f0ed81feb54dfa19917e6acb?pvs=105',
112112
label: 'navigation.feedback',
113113
disabled: false,
114114
connected: false,
@@ -122,9 +122,9 @@ export const routes: RouteItemObj[] = [
122122
connected: false,
123123
},
124124
{
125-
name: 'community',
126-
href: 'https://chat.ens.domains/',
127-
label: 'navigation.community',
125+
name: 'blog',
126+
href: 'https://blog.ens.domains',
127+
label: 'navigation.blog',
128128
disabled: false,
129129
connected: false,
130130
},
@@ -137,7 +137,7 @@ export const routes: RouteItemObj[] = [
137137
},
138138
{
139139
name: 'bounty',
140-
href: 'https://docs.ens.domains/bug-bounty-program',
140+
href: 'https://docs.ens.domains/bugs#-bug-bounty-program',
141141
label: 'navigation.bounty',
142142
disabled: false,
143143
connected: false,

src/utils/supportLinks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const SUPPORT_LINKS = {
44
homoglyphs: 'https://support.ens.domains/en/articles/7901658-homoglyphs',
5-
namesAndSubnames: 'https://support.ens.domains/en/articles/7902188-managing-a-name#h_d83b3ffcb0',
5+
namesAndSubnames: 'https://support.ens.domains/en/articles/8883890-create-delete-ens-subnames',
66
managersAndOwners: 'https://support.ens.domains/en/articles/7902188-managing-a-name#h_3cf7f2fbdf',
77
resolver: 'https://support.ens.domains/en/articles/7902188-managing-a-name#h_1ef2545a3f',
88
fuses: 'https://support.ens.domains/en/articles/7902567-fuses',

0 commit comments

Comments
 (0)