Skip to content

Commit 61689e8

Browse files
committed
fix: margins on homescreen + basic styles of disabled website
1 parent fb7ad3a commit 61689e8

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

src/app/screens/Home/DefaultView/index.tsx

+22-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { ArrowRightIcon } from "@bitcoin-design/bitcoin-icons-react/filled";
2-
import Button from "@components/Button";
32
import Loading from "@components/Loading";
43
import TransactionsTable from "@components/TransactionsTable";
54
import {
@@ -12,7 +11,9 @@ import relativeTime from "dayjs/plugin/relativeTime";
1211
import { FC, useEffect, useState } from "react";
1312
import { useTranslation } from "react-i18next";
1413
import { useNavigate } from "react-router-dom";
14+
import Alert from "~/app/components/Alert";
1515
import BalanceBox from "~/app/components/BalanceBox";
16+
import Button from "~/app/components/Button";
1617
import Hyperlink from "~/app/components/Hyperlink";
1718
import { IconLinkCard } from "~/app/components/IconLinkCard/IconLinkCard";
1819
import SkeletonLoader from "~/app/components/SkeletonLoader";
@@ -116,7 +117,26 @@ const DefaultView: FC<Props> = (props) => {
116117
{props.renderPublisherWidget && !!props.lnDataFromCurrentTab?.length && (
117118
<PublisherLnData lnData={props.lnDataFromCurrentTab[0]} />
118119
)}
120+
119121
<div className="p-4">
122+
{isBlockedUrl && (
123+
<div className="items-center dark:text-white text-sm mb-4">
124+
<Alert type="info">
125+
<p className="pb-2">
126+
{t("default_view.is_blocked_hint", {
127+
host: props.currentUrl?.host,
128+
})}
129+
</p>
130+
<Button
131+
fullWidth
132+
label={t("actions.enable_now")}
133+
direction="column"
134+
onClick={() => unblock()}
135+
/>
136+
</Alert>
137+
</div>
138+
)}
139+
120140
<BalanceBox />
121141
{(accountLoading || lightningAddress) && (
122142
<div className="flex justify-center">
@@ -163,22 +183,6 @@ const DefaultView: FC<Props> = (props) => {
163183
</HomeButton>
164184
</div>
165185

166-
{isBlockedUrl && (
167-
<div className="mb-2 items-center py-3 dark:text-white">
168-
<p className="py-1">
169-
{t("default_view.is_blocked_hint", {
170-
host: props.currentUrl?.host,
171-
})}
172-
</p>
173-
<Button
174-
fullWidth
175-
label={t("actions.enable_now")}
176-
direction="column"
177-
onClick={() => unblock()}
178-
/>
179-
</div>
180-
)}
181-
182186
{isLoading && (
183187
<div className="flex justify-center mt-4">
184188
<Loading />
@@ -187,7 +191,7 @@ const DefaultView: FC<Props> = (props) => {
187191

188192
{!isLoading && (
189193
<div>
190-
<div className="flex flex-col gap-2 md:gap-3">
194+
<div className="flex flex-col mt-4 gap-2 md:gap-3">
191195
{transactions.length == 0 && (
192196
<IconLinkCard
193197
title={t("default_view.actions.get_started.title")}

0 commit comments

Comments
 (0)