Show errors in curation container

This commit is contained in:
franzap
2024-10-15 10:32:35 -03:00
parent 5a9562a2f9
commit 4d42f5a95e
+6 -6
View File
@@ -75,11 +75,11 @@ class AppCurationContainer extends HookConsumerWidget {
builder: (context, ref, _) {
final state =
ref.watch(appCurationSetProvider(selectedAppCurationSet));
return switch (state) {
AsyncData(value: final set) =>
HorizontalGrid(apps: set.apps.toList()),
_ => HorizontalGrid(apps: []),
};
return state.when(
data: (set) => HorizontalGrid(apps: set.apps.toList()),
error: (e, _) => Text('Error: $e'),
loading: () => HorizontalGrid(apps: []),
);
},
),
],
@@ -131,4 +131,4 @@ final appCurationSetProvider = AsyncNotifierProvider.family<
ReplaceableEventLink>(AppCurationSetNotifier.new);
final _selectedIdProvider = StateProvider<ReplaceableEventLink>(
(_) => (30267, kZapstorePubkey, 'privacy'));
(_) => (30267, kZapstorePubkey, 'basics'));