Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"favourites": "Favourites",
"settings": "Settings",
"governance": "Governance",
"community": "Community",
"blog": "Blog",
"developers": "Developers",
"support": "Support",
"bounty": "Bug Bounty",
Expand Down
9 changes: 9 additions & 0 deletions src/components/@atoms/BaseLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ import { createUrlObject } from '@app/utils/urlObject'

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

const isExternalUrl = (url: string | LinkProps['href']): boolean =>
typeof url === 'string' && (url.startsWith('http://') || url.startsWith('https://'))

const BaseLink = ({ href, ...rest }: PropsWithChildren<LinkProps>) => {
const router = useRouter()
const referrer = router.query.referrer as string | undefined

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

const newHref = useMemo(() => {
if (isExternalUrl(href)) return href
const urlObject = createUrlObject(href, {
from: router.asPath,
referrer: router.query.referrer as string | undefined,
})
return getDestination(urlObject)
}, [href, router.asPath, router.query.referrer])

if (isExternalUrl(href)) {
return <Link {...rest} legacyBehavior href={href} />
}

return <Link {...rest} legacyBehavior href={newHref} as={createDecorativeUrlObject(newHref)} />
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export const LoadBar = ({ status, sendTime }: { status: Status; sendTime: number
<Outlink
iconPosition="before"
icon={QuestionCircleSVG}
href="https://support.ens.domains/en/articles/7982906-long-running-transactions"
href="https://support.ens.domains/en/articles/13608541-transaction-troubleshooting"
>
{t('transaction.dialog.sent.learn')}
</Outlink>
Expand Down
12 changes: 6 additions & 6 deletions src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
export type PublicRoute =
| 'search'
| 'governance'
| 'community'
| 'blog'
| 'developers'
| 'support'
| 'bounty'
Expand Down Expand Up @@ -108,7 +108,7 @@ export const routes: RouteItemObj[] = [
},
{
name: 'feedback',
href: 'https://docs.google.com/forms/d/e/1FAIpQLSfDzIszteoaqiayxUCpFLK1AgigoASHIPcsxFg8PZoS6R6Uzw/viewform?usp=sf_link',
href: 'https://enslabs.notion.site/20d7a8b1f0ed81feb54dfa19917e6acb?pvs=105',
label: 'navigation.feedback',
disabled: false,
connected: false,
Expand All @@ -122,9 +122,9 @@ export const routes: RouteItemObj[] = [
connected: false,
},
{
name: 'community',
href: 'https://chat.ens.domains/',
label: 'navigation.community',
name: 'blog',
href: 'https://blog.ens.domains',
label: 'navigation.blog',
disabled: false,
connected: false,
},
Expand All @@ -137,7 +137,7 @@ export const routes: RouteItemObj[] = [
},
{
name: 'bounty',
href: 'https://docs.ens.domains/bug-bounty-program',
href: 'https://docs.ens.domains/bugs#-bug-bounty-program',
label: 'navigation.bounty',
disabled: false,
connected: false,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/supportLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const SUPPORT_LINKS = {
homoglyphs: 'https://support.ens.domains/en/articles/7901658-homoglyphs',
namesAndSubnames: 'https://support.ens.domains/en/articles/7902188-managing-a-name#h_d83b3ffcb0',
namesAndSubnames: 'https://support.ens.domains/en/articles/8883890-create-delete-ens-subnames',
managersAndOwners: 'https://support.ens.domains/en/articles/7902188-managing-a-name#h_3cf7f2fbdf',
resolver: 'https://support.ens.domains/en/articles/7902188-managing-a-name#h_1ef2545a3f',
fuses: 'https://support.ens.domains/en/articles/7902567-fuses',
Expand Down