Tweak loading state for block dialog (#11236)
This commit is contained in:
@@ -181,6 +181,7 @@ function BlockDialogInner({
|
|||||||
const footer = (
|
const footer = (
|
||||||
<View style={[a.w_full, a.gap_sm, a.justify_end]}>
|
<View style={[a.w_full, a.gap_sm, a.justify_end]}>
|
||||||
<Button
|
<Button
|
||||||
|
disabled={isLoading}
|
||||||
color={profile.viewer?.blocking ? undefined : 'negative'}
|
color={profile.viewer?.blocking ? undefined : 'negative'}
|
||||||
size="large"
|
size="large"
|
||||||
label={profile.viewer?.blocking ? l`Unblock` : l`Block`}
|
label={profile.viewer?.blocking ? l`Unblock` : l`Block`}
|
||||||
@@ -192,6 +193,7 @@ function BlockDialogInner({
|
|||||||
<Trans>Block</Trans>
|
<Trans>Block</Trans>
|
||||||
)}
|
)}
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
|
{isLoading ? <ButtonIcon icon={Loader} /> : null}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -211,11 +213,6 @@ function BlockDialogInner({
|
|||||||
label={profile.viewer?.blocking ? l`Unblock` : l`Block`}
|
label={profile.viewer?.blocking ? l`Unblock` : l`Block`}
|
||||||
style={[web([{maxWidth: 420}])]}>
|
style={[web([{maxWidth: 420}])]}>
|
||||||
{listHeader}
|
{listHeader}
|
||||||
{isLoading ? (
|
|
||||||
<View style={[a.pb_2xl, a.align_center, a.justify_center]}>
|
|
||||||
<Loader size="xl" />
|
|
||||||
</View>
|
|
||||||
) : null}
|
|
||||||
{footer}
|
{footer}
|
||||||
</Dialog.ScrollableInner>
|
</Dialog.ScrollableInner>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user