diff --git a/src/components/dialogs/StarterPackDialog.tsx b/src/components/dialogs/StarterPackDialog.tsx
index f9076001fa..a8e7759584 100644
--- a/src/components/dialogs/StarterPackDialog.tsx
+++ b/src/components/dialogs/StarterPackDialog.tsx
@@ -19,7 +19,6 @@ import {
useListMembershipAddMutation,
useListMembershipRemoveMutation,
} from '#/state/queries/list-memberships'
-import {List} from '#/view/com/util/List'
import * as Toast from '#/view/com/util/Toast'
import {UserAvatar} from '#/view/com/util/UserAvatar'
import {atoms as a, useTheme} from '#/alf'
@@ -72,38 +71,15 @@ export function StarterPackDialog({
],
})
- const onClose = React.useCallback(() => {
- control.close()
- }, [control])
-
- const t = useTheme()
-
return (
-
-
-
-
- Add to starter packs
-
-
-
-
-
-
-
+
)
}
@@ -113,8 +89,7 @@ function Empty({onStartWizard}: {onStartWizard: () => void}) {
const t = useTheme()
return (
-
+
void}) {
-
+
+
+
)
}
function StarterPackList({
+ control,
onStartWizard,
targetDid,
enabled,
}: {
+ control: Dialog.DialogControlProps
onStartWizard: () => void
targetDid: string
enabled?: boolean
}) {
const {_} = useLingui()
+ const t = useTheme()
const {
data,
@@ -187,54 +167,81 @@ function StarterPackList({
[targetDid],
)
- const ListHeaderComponent = React.useCallback(
- () => (
- <>
-
-
- New starter pack
-
-
-
-
- >
- ),
- [_, onStartWizard],
+ const onClose = React.useCallback(() => {
+ control.close()
+ }, [control])
+
+ const listHeader = (
+ <>
+
+
+ Add to starter packs
+
+
+
+ {membershipItems.length > 0 && (
+ <>
+
+
+ New starter pack
+
+
+
+
+ >
+ )}
+ >
)
if (isLoading) {
return (
-
-
-
+ <>
+
+
+
+
+ >
)
}
return (
-
- item.starterPack.uri || index.toString()
- }
- refreshing={false}
- onRefresh={_onRefresh}
- onEndReached={_onEndReached}
- onEndReachedThreshold={0.1}
- ListHeaderComponent={
- membershipItems.length > 0 ? ListHeaderComponent : null
- }
- ListEmptyComponent={}
- />
+ <>
+
+
+ item.starterPack.uri || index.toString()
+ }
+ refreshing={false}
+ onRefresh={_onRefresh}
+ onEndReached={_onEndReached}
+ onEndReachedThreshold={0.1}
+ ListHeaderComponent={listHeader}
+ ListEmptyComponent={}
+ contentContainerStyle={[a.px_2xl, a.pt_lg]}
+ />
+ >
)
}