Adding little message at the bottom of the drafts list (#9827)
* Add encouragement message to drafts list Shows "So many thoughts, you should post one" at the bottom of the drafts list when user has more than 5 drafts. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Use Text component and center-align encouragement message - Switch from ButtonText to Text component for better styling - Add text-center alignment to the message Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import * as Dialog from '#/components/Dialog'
|
|||||||
import {PageX_Stroke2_Corner0_Rounded_Large as PageXIcon} from '#/components/icons/PageX'
|
import {PageX_Stroke2_Corner0_Rounded_Large as PageXIcon} from '#/components/icons/PageX'
|
||||||
import {ListFooter} from '#/components/Lists'
|
import {ListFooter} from '#/components/Lists'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
|
import {Text} from '#/components/Typography'
|
||||||
import {useAnalytics} from '#/analytics'
|
import {useAnalytics} from '#/analytics'
|
||||||
import {IS_NATIVE} from '#/env'
|
import {IS_NATIVE} from '#/env'
|
||||||
import {DraftItem} from './DraftItem'
|
import {DraftItem} from './DraftItem'
|
||||||
@@ -140,13 +141,22 @@ export function DraftsListDialog({
|
|||||||
|
|
||||||
const footerComponent = useMemo(
|
const footerComponent = useMemo(
|
||||||
() => (
|
() => (
|
||||||
|
<>
|
||||||
|
{drafts.length > 5 && (
|
||||||
|
<View style={[a.align_center, a.py_2xl]}>
|
||||||
|
<Text style={[a.text_center, t.atoms.text_contrast_medium]}>
|
||||||
|
<Trans>So many thoughts, you should post one</Trans>
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
<ListFooter
|
<ListFooter
|
||||||
isFetchingNextPage={isFetchingNextPage}
|
isFetchingNextPage={isFetchingNextPage}
|
||||||
hasNextPage={hasNextPage}
|
hasNextPage={hasNextPage}
|
||||||
style={[a.border_transparent]}
|
style={[a.border_transparent]}
|
||||||
/>
|
/>
|
||||||
|
</>
|
||||||
),
|
),
|
||||||
[isFetchingNextPage, hasNextPage],
|
[isFetchingNextPage, hasNextPage, drafts.length, t],
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user