Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
b8011af8
Commit
b8011af8
authored
Jan 25, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
token seo
parent
1aaeafd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
getSeo.ts
lib/next/token/getSeo.ts
+1
-1
Token.tsx
ui/pages/Token.tsx
+15
-1
No files found.
lib/next/token/getSeo.ts
View file @
b8011af8
...
...
@@ -8,7 +8,7 @@ export default function getSeo(params: PageParams) {
return
{
title
:
params
?
`
${
params
.
hash
}
-
${
networkTitle
}
`
:
''
,
description
:
params
?
`
${
params
.
hash
}
, balances
,
and analytics on the on the
${
networkTitle
}
`
:
`
${
params
.
hash
}
, balances and analytics on the on the
${
networkTitle
}
`
:
''
,
};
}
ui/pages/Token.tsx
View file @
b8011af8
import
{
Skeleton
,
Box
}
from
'
@chakra-ui/react
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
,
{
useEffect
}
from
'
react
'
;
import
type
{
RoutedTab
}
from
'
ui/shared/RoutedTabs/types
'
;
...
...
@@ -30,6 +30,20 @@ const TokenPageContent = () => {
queryOptions
:
{
enabled
:
Boolean
(
router
.
query
.
hash
)
},
});
useEffect
(()
=>
{
if
(
tokenQuery
.
data
)
{
const
tokenName
=
`
${
tokenQuery
.
data
.
name
}
(
${
tokenQuery
.
data
.
symbol
}
)`
;
const
title
=
document
.
getElementsByTagName
(
'
title
'
)[
0
];
if
(
title
)
{
title
.
textContent
=
title
.
textContent
?.
replace
(
tokenQuery
.
data
.
address
,
tokenName
)
||
title
.
textContent
;
}
const
description
=
document
.
getElementsByName
(
'
description
'
)[
0
]
as
HTMLMetaElement
;
if
(
description
)
{
description
.
content
=
description
.
content
.
replace
(
tokenQuery
.
data
.
address
,
tokenName
)
||
description
.
content
;
}
}
},
[
tokenQuery
.
data
]);
const
transfersQuery
=
useQueryWithPages
({
resourceName
:
'
token_transfers
'
,
pathParams
:
{
hash
:
router
.
query
.
hash
?.
toString
()
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment