From b2eea78ed7d70ea59f4808a05c55105ec3a3ef07 Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Thu, 1 Feb 2024 21:54:05 +0700 Subject: [PATCH] style: change style of alert in write something block --- .../posts/WriteSomething.module.sass | 3 +- src/components/posts/WriteSomething.tsx | 57 ++++++++++--------- 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/src/components/posts/WriteSomething.module.sass b/src/components/posts/WriteSomething.module.sass index c99d62169..58e153714 100644 --- a/src/components/posts/WriteSomething.module.sass +++ b/src/components/posts/WriteSomething.module.sass @@ -34,4 +34,5 @@ .Alert border: none - border-radius: $border_radius_big \ No newline at end of file + border-radius: $border_radius_big + padding: $space_normal !important \ No newline at end of file diff --git a/src/components/posts/WriteSomething.tsx b/src/components/posts/WriteSomething.tsx index 12c1a1ed1..ef27145c6 100644 --- a/src/components/posts/WriteSomething.tsx +++ b/src/components/posts/WriteSomething.tsx @@ -13,6 +13,7 @@ import { selectSpaceIdsThatCanSuggestIfSudo } from 'src/utils' import { useMyAddress } from '../auth/MyAccountsContext' import { FormatBalance } from '../common/balances' import Avatar from '../profiles/address-views/Avatar' +import { useResponsiveSize } from '../responsive' import { newSpaceUrl } from '../urls' import Segment from '../utils/Segment' import { PostEditorModal } from './editor/ModalEditor' @@ -30,6 +31,8 @@ export default function WriteSomething({ defaultSpaceId, ...props }: WriteSometh const { data: totalStake, loading: loadingTotalStake } = useFetchTotalStake(myAddress) const neededLock = getNeededLock(totalStake?.amount) + const { isSmallMobile } = useResponsiveSize() + const { isLoading, spaceIds: ids } = useSelectSpaceIdsWhereAccountCanPostWithLoadingStatus(myAddress) if (isLoading) { @@ -71,40 +74,42 @@ export default function WriteSomething({ defaultSpaceId, ...props }: WriteSometh )} - {!loadingTotalStake && neededLock > 0 && ( + {!loadingTotalStake && neededLock > 0 && anySpace && ( -
- - - Post to Earn - +
+
+
+
+ + Post to Earn +
+
+
+ + To start earning SUB rewards, increase your lock by at least{' '} + + . + +
-
- } - type='warning' - description={ -
- - To start earning SUB rewards, increase your lock by at least{' '} - - . -
} + type='warning' /> )}