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
d2e00dd1
Unverified
Commit
d2e00dd1
authored
Sep 18, 2023
by
Igor Stuev
Committed by
GitHub
Sep 18, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1183 from blockscout/footer-front-commit
add front commit link
parents
7b8bcdf5
7a655af2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
Footer.tsx
ui/snippets/footer/Footer.tsx
+15
-2
No files found.
ui/snippets/footer/Footer.tsx
View file @
d2e00dd1
...
@@ -25,6 +25,7 @@ import getApiVersionUrl from './utils/getApiVersionUrl';
...
@@ -25,6 +25,7 @@ import getApiVersionUrl from './utils/getApiVersionUrl';
const
MAX_LINKS_COLUMNS
=
3
;
const
MAX_LINKS_COLUMNS
=
3
;
const
FRONT_VERSION_URL
=
`https://github.com/blockscout/frontend/tree/
${
config
.
UI
.
footer
.
frontendVersion
}
`
;
const
FRONT_VERSION_URL
=
`https://github.com/blockscout/frontend/tree/
${
config
.
UI
.
footer
.
frontendVersion
}
`
;
const
FRONT_COMMIT_URL
=
`https://github.com/blockscout/frontend/commit/
${
config
.
UI
.
footer
.
frontendCommit
}
`
;
const
Footer
=
()
=>
{
const
Footer
=
()
=>
{
...
@@ -74,6 +75,18 @@ const Footer = () => {
...
@@ -74,6 +75,18 @@ const Footer = () => {
},
},
];
];
const
frontendLink
=
(()
=>
{
if
(
config
.
UI
.
footer
.
frontendVersion
)
{
return
<
Link
href=
{
FRONT_VERSION_URL
}
target=
"_blank"
>
{
config
.
UI
.
footer
.
frontendVersion
}
</
Link
>;
}
if
(
config
.
UI
.
footer
.
frontendCommit
)
{
return
<
Link
href=
{
FRONT_COMMIT_URL
}
target=
"_blank"
>
{
config
.
UI
.
footer
.
frontendCommit
}
</
Link
>;
}
return
null
;
})();
const
fetch
=
useFetch
();
const
fetch
=
useFetch
();
const
{
isLoading
,
data
:
linksData
}
=
useQuery
<
unknown
,
ResourceError
<
unknown
>
,
Array
<
CustomLinksGroup
>>
(
const
{
isLoading
,
data
:
linksData
}
=
useQuery
<
unknown
,
ResourceError
<
unknown
>
,
Array
<
CustomLinksGroup
>>
(
...
@@ -111,9 +124,9 @@ const Footer = () => {
...
@@ -111,9 +124,9 @@ const Footer = () => {
Backend:
<
Link
href=
{
apiVersionUrl
}
target=
"_blank"
>
{
backendVersionData
?.
backend_version
}
</
Link
>
Backend:
<
Link
href=
{
apiVersionUrl
}
target=
"_blank"
>
{
backendVersionData
?.
backend_version
}
</
Link
>
</
Text
>
</
Text
>
)
}
)
}
{
(
config
.
UI
.
footer
.
frontendVersion
||
config
.
UI
.
footer
.
frontendCommit
)
&&
(
{
frontendLink
&&
(
<
Text
fontSize=
"xs"
>
<
Text
fontSize=
"xs"
>
Frontend:
<
Link
href=
{
FRONT_VERSION_URL
}
target=
"_blank"
>
{
config
.
UI
.
footer
.
frontendVersion
}
</
Link
>
Frontend:
{
frontendLink
}
</
Text
>
</
Text
>
)
}
)
}
</
VStack
>
</
VStack
>
...
...
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