Skip to content

Commit 866592d

Browse files
committed
Remove banner in prod
1 parent 413100c commit 866592d

4 files changed

Lines changed: 34 additions & 26 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
VITE_BASE_RPC_URL: ${{ secrets.BASE_RPC_URL }}
4444
VITE_GNOSIS_NODE_RPC_URL: ${{ secrets.GNOSIS_RPC_URL }}
4545
VITE_LINEA_RPC_URL: ${{ secrets.LINEA_RPC_URL }}
46+
VITE_SHOW_BANNER: true
4647

4748
- name: Setup Pages
4849
uses: actions/configure-pages@v5

apps/hyperdrive-trading/.env.sample

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,7 @@ VITE_ENABLE_WHY_DID_YOU_RENDER=
6464

6565
# If deploying to a subdirectory
6666
# Typically added as a repo secret or in the deployment environment
67-
VITE_BASE_PATH=/
67+
VITE_BASE_PATH=/
68+
69+
# Show the announcement banner
70+
VITE_SHOW_BANNER=true

apps/hyperdrive-trading/src/ui/app/Page.tsx

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import CustomBanner from "src/ui/base/components/CustomBanner";
99
import { TermsOfUseAndPrivacyPolicyModal } from "src/ui/compliance/TermsOfUseAndPrivacyPolicyModal";
1010
import { useAddressScreen } from "src/ui/compliance/hooks/useAddressScreen";
1111

12+
const showBanner = import.meta.env.VITE_SHOW_BANNER === "true";
13+
1214
export function Page({ children }: PropsWithChildren): ReactElement {
1315
// compliance
1416
useAddressScreen();
@@ -17,32 +19,33 @@ export function Page({ children }: PropsWithChildren): ReactElement {
1719
<div className="flex min-h-screen flex-col items-center justify-between gap-9">
1820
<div className="flex w-full grow flex-col items-center gap-9">
1921
<Navbar />
20-
{/* <MilesBanner /> */}
21-
<CustomBanner
22-
className="bg-error/20"
23-
description={
24-
<div className="flex w-full flex-1 items-center justify-center gap-4">
25-
<ExclamationTriangleIcon className="size-5 shrink-0" />
26-
<div className="max-w-4xl">
27-
<p>
28-
Thank you for using DELV. Unfortunately, we are winding down
29-
operations. Access to this site is guaranteed until Summer
30-
2027. To run the UI locally, you can find the source code and
31-
setup instructions on{" "}
32-
<ExternalLink
33-
newTab
34-
icon
35-
href="https://github.com/delvtech/hyperdrive-frontend"
36-
className="daisy-link-hover daisy-link"
37-
>
38-
GitHub
39-
</ExternalLink>
40-
.
41-
</p>
22+
{showBanner && (
23+
<CustomBanner
24+
className="bg-error/20"
25+
description={
26+
<div className="flex w-full flex-1 items-center justify-center gap-4">
27+
<ExclamationTriangleIcon className="size-5 shrink-0" />
28+
<div className="max-w-4xl">
29+
<p>
30+
Thank you for using DELV. Unfortunately, we are winding down
31+
operations. Access to this site is guaranteed until Summer
32+
2027. To run the UI locally, you can find the source code
33+
and setup instructions on{" "}
34+
<ExternalLink
35+
newTab
36+
icon
37+
href="https://github.com/delvtech/hyperdrive-frontend"
38+
className="daisy-link-hover daisy-link"
39+
>
40+
GitHub
41+
</ExternalLink>
42+
.
43+
</p>
44+
</div>
4245
</div>
43-
</div>
44-
}
45-
/>
46+
}
47+
/>
48+
)}
4649

4750
{/* compliance */}
4851
<TermsOfUseAndPrivacyPolicyModal />

turbo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"env": [
1515
"DEV",
1616
"PROD",
17+
"VITE_SHOW_BANNER",
1718
"VITE_BASE_PATH",
1819
"NODE_ENV",
1920
"VITE_ADDRESS_SCREEN_URL",

0 commit comments

Comments
 (0)