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
766c2b73
Commit
766c2b73
authored
Jan 29, 2024
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
production configs
parent
e958e775
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
.env.eth
configs/envs/.env.eth
+1
-0
ad.ts
nextjs/csp/policies/ad.ts
+0
-1
HypeBanner.tsx
ui/shared/ad/HypeBanner.tsx
+5
-2
hypeBannerScript.ts
ui/shared/ad/hypeBannerScript.ts
+5
-2
No files found.
configs/envs/.env.eth
View file @
766c2b73
...
...
@@ -43,6 +43,7 @@ NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com
NEXT_PUBLIC_CONTRACT_INFO_API_HOST=https://contracts-info.services.blockscout.com
NEXT_PUBLIC_ADMIN_SERVICE_API_HOST=https://admin-rs.services.blockscout.com
NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER=blockscout
NEXT_PUBLIC_AD_BANNER_PROVIDER=hype
#meta
NEXT_PUBLIC_OG_IMAGE_URL=https://github.com/blockscout/frontend-configs/blob/main/configs/og-images/eth.jpg?raw=true
nextjs/csp/policies/ad.ts
View file @
766c2b73
...
...
@@ -17,7 +17,6 @@ export function ad(): CspDev.DirectiveDescriptor {
'
*.slise.xyz
'
,
// hype
'
api.hypelab-staging.com
'
,
'
api.hypelab.com
'
,
],
'
frame-src
'
:
[
...
...
ui/shared/ad/HypeBanner.tsx
View file @
766c2b73
...
...
@@ -7,6 +7,9 @@ import { useAccount } from 'wagmi';
import
Web3ModalProvider
from
'
../Web3ModalProvider
'
;
import
{
hypeInit
}
from
'
./hypeBannerScript
'
;
const
DESKTOP_BANNER_SLUG
=
'
b1559fc3e7
'
;
const
MOBILE_BANNER_SLUG
=
'
668ed80a9e
'
;
const
HypeBannerContent
=
({
className
}:
{
className
?:
string
})
=>
{
return
(
...
...
@@ -16,10 +19,10 @@ const HypeBannerContent = ({ className }: { className?: string }) => {
strategy=
"afterInteractive"
>
{
hypeInit
}
</
Script
>
<
Flex
className=
{
className
}
h=
"90px"
display=
{
{
base
:
'
none
'
,
lg
:
'
flex
'
}
}
>
<
Banner
placement=
"771e47c10c"
/>
<
Banner
placement=
{
DESKTOP_BANNER_SLUG
}
/>
</
Flex
>
<
Flex
className=
{
className
}
h=
"50px"
display=
{
{
base
:
'
flex
'
,
lg
:
'
none
'
}
}
>
<
Banner
placement=
"64412f33ad"
/>
<
Banner
placement=
{
MOBILE_BANNER_SLUG
}
/>
</
Flex
>
</>
);
...
...
ui/shared/ad/hypeBannerScript.ts
View file @
766c2b73
import
config
from
'
configs/app
'
;
const
PRODUCTION_PROPERTY_SLUG
=
'
127fddd522
'
;
const
HYPE_API_URL
=
'
https://api.hypelab.com
'
;
export
const
hypeInit
=
(()
=>
{
const
feature
=
config
.
features
.
adsBanner
;
...
...
@@ -11,8 +14,8 @@ export const hypeInit = (() => {
((l = document.createElement(h)).async = !0),
(l.src = y),
(l.onload = function () {
(a = { URL: p, propertySlug: e, environment: '
development
' }), HypeLab.initialize(a);
(a = { URL: p, propertySlug: e, environment: '
production
' }), HypeLab.initialize(a);
}),
(b = document.getElementsByTagName(h)[0]).parentNode.insertBefore(l, b);
})('script', 'https://api.hypelab.com/v1/scripts/hp-sdk.js?v=0', '
https://api.hypelab-staging.com', 'baaded78c2
');`
;
})('script', 'https://api.hypelab.com/v1/scripts/hp-sdk.js?v=0', '
${
HYPE_API_URL
}
', '
${
PRODUCTION_PROPERTY_SLUG
}
');`
;
})();
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